Skip to content

Commit

Permalink
[ci] Add variable to disable selected jobs (#1986)
Browse files Browse the repository at this point in the history
* [ci] Add variable to disable selected jobs

* apply suggestion

Co-authored-by: parity-processbot <>
  • Loading branch information
alvicsam authored Dec 13, 2022
1 parent 0881ceb commit 3d13ae0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ variables:
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs

.job-switcher:
before_script:
- if echo "$CI_DISABLED_JOBS" | grep -xF "$CI_JOB_NAME"; then echo "The job has been cancelled in CI settings"; exit 0; fi

.docker-env:
image: "${CI_IMAGE}"
before_script:
- !reference [.job-switcher, before_script]
- rustup show
- cargo --version
- rustup +nightly show
Expand All @@ -108,6 +113,8 @@ variables:

.kubernetes-env:
image: "${CI_IMAGE}"
before_script:
- !reference [.job-switcher, before_script]
tags:
- kubernetes-parity-build

Expand Down

0 comments on commit 3d13ae0

Please sign in to comment.