To keep things short, these are the requirements for workflow of a GitLab CI/CD pipeline
- Pipeline should automatically run on MR create event
- Pipeline should not run for any commit/push before or after MR is created
To keep things short, these are the requirements for workflow of a GitLab CI/CD pipeline
In order enable pipeline for merge requests for all jobs, you can make use of workflow:rules
.
Here is an example:
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID # Execute jobs in merge request context
build:
stage: build
script: ./build
test:
stage: test
script: ./test