Make the workflow to avoid duplicate pipelines in merge requests easy to use
Earlier (before #201845 (closed) was worked on) users often witnessed multiple pipelines being run for their push to a given branch, one for the merge request, another one for the branch.
Now by defining rule with
$CI_MERGE_REQUEST_IID this can be avoided. Each time users want to configure their settings to avoid running run multiple pipelines on a push, they have to add a rule like one of the following to their
workflow: rules: - if: $CI_MERGE_REQUEST_IID - if: $CI_OPEN_MERGE_REQUESTS when: never - if: $CI_COMMIT_BRANCH
workflow: rules: - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS when: never - when: always
This is understandable for users who are comfortable with the technology but difficult to use for others.
✨ Design Proposal(Expectations)
- Define a default behaviour for the situation
- Determine if any controls should be provided through the project settings
- Propose a simpler workflow to add the rule to teh configuration