Skipping pipelines commit option does not work for merge request pipelines OR merged results pipelines
Problem
When pushing new commits to a merge request, with --push-option ci.skip
it doesn't skip the pipeline that is intended for merge requests only.
It creates a new empty pipeline that is skipped instead, and still runs the original pipeline.
Steps to reproduce
- make a
.gitlab-ci.yml
with a job that should only run on merge requestsonly: [merge_requests]
- Open a merge request
- Push new commits to the merge request with the ci.skip push option as described here (or use
--push-option
if your git version does not support the short version)
Example Project
What is the current behavior?
The merge requests gets an extra pipeline that is skipped (and empty) and the pipeline that is run in the merge request context still runs.
What is the desired behavior?
The pipeline for merge requests is skipped and no extra pipelines should be created without using extra workflow:rules:if
entries in the .gitlab-ci.yml
file.
Relevant logs and/or screenshots
Use Cases / Extra Details
- This can be complicated when users also need to setup the merge request pipelines to avoid duplicate branch and merge request pipelines.
- It is documented that push options do not support
ci.skip
for merge request pipelines yet.
Possible workarounds
- It may be possible to setup a
workflow:rule:if
entry to check the$CI_COMMIT_MESSAGE
for "skip ci" or "ci skip" and skip pipeline creation. This may result in unexpected pipelines.
Edited by James Heimbuck