In the merge checks settings, I have enabled the "pipelines must succeed" option:

But the branches without any jobs are stuck at merge by saying "waiting for pipelines status" and you can't merge without a successful pipeline.
Can I enable the "pipelines must succeed" option only for some specific branches like master/production?
As a workaround, you can trigger a merge request pipeline from the branches that don't currently have any jobs. The pipeline can have a single job that always passes. A merge request pipeline will only be created after a MR is created, not before.
A simple job like this should work:
print-info:
stage: setup
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
script:
- 'echo "Job start: $CI_JOB_STARTED_AT"'
- 'echo "Branch: $CI_COMMIT_BRANCH"'
- 'echo "Commit Author: $CI_COMMIT_AUTHOR"'
Note: I'm not sure what your current pipeline looks like, so you may have to change the rules section to suit your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With