UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit f2cdaa3a authored by joshwolf's avatar joshwolf Committed by Josh Wolf
Browse files

ci: only run infra jobs on merges to master

parent 3d7e59bd
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !211. Comments created here will be created in the context of that merge request.
......@@ -184,8 +184,8 @@ upgrade:
# skip job when branch name starts with "hotfix" or "patch"
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^(hotfix|patch)/'
when: never
# run job on merge requests when manually activated
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
# run infrastructure pipelines only on merges into master, and run regardless of failure
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
allow_failure: false
when: manual
......@@ -195,17 +195,17 @@ upgrade:
# skip job when branch name starts with "hotfix" or "patch"
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^(hotfix|patch)/'
when: never
# run pipeline on commits to default branch
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
# run infrastructure pipelines only on merges into master
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
# Abstract for jobs responsible for cleaning up infrastructure
.infra cleanup:
rules:
# skip job when branch name starts with "hotfix" or "patch"
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^(hotfix|patch)/'
when: never
# run job on merge requests regardless of failure
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
# run infrastructure pipelines only on merges into master, and run regardless of failure
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
allow_failure: true
when: always
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment