Allow certain pipelines to be prevented and still allow merge if "Pipelines must succeed" is true
Problem statement
Issue has been raised based on a Slack conversation (internal).
A recent customer support interaction has highlighted that perhaps the logic around prevented pipelines is causing issues with some legitimate development workflows. The customer has "Pipelines must succeed" set to true. They use a workflow where their CI/CD pipeline will use the Add changelog data to a changelog file API, performed as a bot user. The customer does not want the change to changelog on the MR's source branch to trigger a merge request pipeline. If they use workflow:rules
to prevent the pipeline, the "Checking pipeline status" message shows, and the MR can't be merged, until a new pipeline runs.
According to the docs, the scenario where a pipeline is prevented will result in "Checking pipeline status" to appear. This is already documented and expected behaviour. However, we would like to be able to avoid this scenario.
The customer was given some workarounds but none of these were suitable:
- Allow skipped pipelines to be treated as successful. Instead of preventing them, make sure they're skipped by using the
[skip ci]
commit message when modifying the changelog. However, this does not work for Merged Results pipelines. Also, skipping pipelines, and allowing them to be considered successful, will allow MRs to be merged even if the pipeline before the skipped pipeline fails. - Allow pipeline to run, but run single job which would mimic the status of the previous pipeline. This may not be an elegant solution, and may not be robust.
Proposal
Allow pipelines to be skipped in certain circumstances via workflow:rules
, that won't cause the "Checking Pipeline status" message to appear indefinitely, or prevent merging MR.