Currently I’m having some issues with our CI configuration.
My goal was to add a specific job to merge request pipelines but I ended up having two pipelines where the first one contains the common jobs I want to execute and the second one only the specific job I wanted to add for merge requests.
This is my (trimmed down) .gitlab-ci.yml file:
stages:
- init
- build
- testing
- deploy
versioning:
stage: init
# ...
allow_failure: false
build-release-x64:
stage: build
# ...
dependencies:
- versioning
allow_failure: false
build-release-x86:
stage: build
# ...
dependencies:
- versioning
allow_failure: false
.testsuite:
stage: testing
tags:
- testsuite
# ...
dependencies:
- build-release-x86
- build-release-x64
allow_failure: false
testsuite-merge-requests:
extends: .testsuite
# ...
only:
- merge_requests
except:
- testing
- master
I expected the following pipeline to execute for the non-merge-request scenario:
versioning -> (build-release-x86 + build-release-x64)
I expected the following pipeline to execute for the merge-request scenario (except for merge requests in with source branch testing
or master
):
versioning -> (build-release-x86 + build-release-x64) -> testsuite-merge-requests
Unfortunately I ended up having this:
The two bubbles on the bottom pipeline are versioning
and the build-release-*
jobs, the pipeline on the top contains only the testsuite-merge-requests
job.
Does anyone of you spot the mistake I made?