Skip to content

MWCP requires a successful pipeline if project has ci

Marc Shaw requested to merge mwcp_pipeline_must_succeed into master

What does this MR do and why?

We previously had a check in the merge when checks pass, that would check for pipeline success. This made sense in the merge when pipeline succeeds, but not merge when checks pass so was removed. The idea was that people would have the setting, 'Pipeline must succeed' and the functionality would remain the same therefore. However, people were relying (incorrectly) on merge when pipeline succeeds, being a blocker to being merged, which isn't the case.

This merge request is about restoring this functionality to the merge when checks pass, and changes the when using auto-merge, a pipeline must pass (regardless of the project setting), but the merge immediately setting will depend on the project setting.

To test:

  • Checkout master branch
  • Turn on the feature flags, merge_when_checks_pass and additional_merge_when_checks_ready
  • Check the project -> merge request -> Pipelines must succeed is not ticked
  • Create a new MR that has draft setting, and a failed or cancelled pipeline
  • Set Auto Merge
  • Unset draft
  • The MR will merge
  • Checkout the mwcp_pipeline_must_succeed branch
  • Create a new MR that has draft setting, and a failed or cancelled pipeline
  • Set Auto Merge
  • Unset draft
  • The MR will not merge
Edited by Marc Shaw

Merge request reports