Commit 0869ffbc authored by Hadrien G's avatar Hadrien G
Browse files

Alternative option: keep both, but disable push pipelines while MR pipelines are running

parent 2d8ea5b5
Pipeline #185945 passed with stages
in 11 minutes
......@@ -23,6 +23,15 @@ stages:
- cleanup-sophya
- cleanup-env
# Allow both push and merge request pipelines, but only run one of them: if
# a branch has opened merge requests, then stop running regular branch pipelines
# for this branch.
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- when: always
# Template for jobs that build Docker images
.docker-build:
image:
......
......@@ -12,6 +12,15 @@ default:
stages:
- test
# Allow both push and merge request pipelines, but only run one of them: if
# a branch has opened merge requests, then stop running regular branch pipelines
# for this branch.
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- when: always
# Commonalities between all test jobs
.sophya-test:
stage: test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment