Hello! I browsed through the doc on CI/CD quite extensively, but couldn’t find a quick solution for the below. I’d appreciate some pointers very much
We have a MR pipeline job that runs only if any of specified files have been changed.
The situation I want to avoid:
Commit A contains changes of a given file, therefore the job will run after it is pushed. Let’s say it fails.
Commit B is pushed a few hours later, but doesn’t change any of the files in the job’s condition. The step will not run for this push and the pipeline succeeds.
This is then merged and the pipeline on master fails, because we always run the whole pipeline on master, but I’d want to avoid merging such a thing and not having a false-positive pass.
Question: Is it possible to add a condition for a job that references a previous push for a given MR?
“Run if the job failed for the previous push” or “Run the job if the branch contains changes to the file”
The first one would be better, because we’d reduce the number of overall jobs run, but I’ll take any of them
Thank you so much for pointers and inspiration!