This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Commit 2e21c35 1 parent 59b5903 commit 2e21c35 Copy full SHA for 2e21c35
File tree 4 files changed +14
-1
lines changed
scripts/ci/gitlab/pipeline
4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,14 @@ default:
81
81
paths :
82
82
- artifacts/
83
83
84
+ .job-switcher :
85
+ before_script :
86
+ - if echo "$CI_DISABLED_JOBS" | grep -xF "$CI_JOB_NAME"; then echo "The job has been cancelled in CI settings"; exit 0; fi
87
+
84
88
.kubernetes-env :
85
89
image : " ${CI_IMAGE}"
90
+ before_script :
91
+ - !reference [.job-switcher, before_script]
86
92
tags :
87
93
- kubernetes-parity-build
88
94
@@ -95,6 +101,7 @@ default:
95
101
96
102
.pipeline-stopper-vars :
97
103
script :
104
+ - !reference [.job-switcher, before_script]
98
105
- echo "Collecting env variables for the cancel-pipeline job"
99
106
- echo "FAILED_JOB_URL=${CI_JOB_URL}" > pipeline-stopper.env
100
107
- echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env
@@ -110,6 +117,7 @@ default:
110
117
before_script :
111
118
# TODO: remove unset invocation when we'll be free from 'ENV RUSTC_WRAPPER=sccache' & sccache itself in all images
112
119
- unset RUSTC_WRAPPER
120
+ - !reference [.job-switcher, before_script]
113
121
- !reference [.rust-info-script, script]
114
122
- !reference [.rusty-cachier, before_script]
115
123
- !reference [.pipeline-stopper-vars, script]
@@ -300,7 +308,6 @@ rusty-cachier-notify:
300
308
PR_NUM : " ${PR_NUM}"
301
309
trigger :
302
310
project : " parity/infrastructure/ci_cd/pipeline-stopper"
303
- branch : " as-improve"
304
311
305
312
remove-cancel-pipeline-message :
306
313
stage : .post
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ build-linux-substrate:
62
62
- job : test-linux-stable
63
63
artifacts : false
64
64
before_script :
65
+ - !reference [.job-switcher, before_script]
65
66
- mkdir -p ./artifacts/substrate/
66
67
- !reference [.rusty-cachier, before_script]
67
68
# tldr: we need to checkout the branch HEAD explicitly because of our dynamic versioning approach while building the substrate binary
@@ -94,6 +95,7 @@ build-linux-substrate:
94
95
# this variable gets overriden by "rusty-cachier environment inject", use the value as default
95
96
CARGO_TARGET_DIR : " $CI_PROJECT_DIR/target"
96
97
before_script :
98
+ - !reference [.job-switcher, before_script]
97
99
- mkdir -p ./artifacts/subkey
98
100
- !reference [.rusty-cachier, before_script]
99
101
script :
@@ -118,6 +120,7 @@ build-subkey-macos:
118
120
# duplicating before_script & script sections from .build-subkey hidden job
119
121
# to overwrite rusty-cachier integration as it doesn't work on macos
120
122
before_script :
123
+ - !reference [.job-switcher, before_script]
121
124
- mkdir -p ./artifacts/subkey
122
125
script :
123
126
- cd ./bin/utils/subkey
Original file line number Diff line number Diff line change 12
12
DOCKERFILE : $PRODUCT.Dockerfile
13
13
IMAGE_NAME : docker.io/$IMAGE_PATH
14
14
before_script :
15
+ - !reference [.job-switcher, before_script]
15
16
- cd ./artifacts/$PRODUCT/
16
17
- VERSION="$(cat ./VERSION)"
17
18
- echo "${PRODUCT} version = ${VERSION}"
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ cargo-check-benches:
65
65
before_script :
66
66
# perform rusty-cachier operations before any further modifications to the git repo to make cargo feel cheated not so much
67
67
- !reference [.rust-info-script, script]
68
+ - !reference [.job-switcher, before_script]
68
69
- !reference [.rusty-cachier, before_script]
69
70
- !reference [.pipeline-stopper-vars, script]
70
71
# merges in the master branch on PRs
@@ -414,6 +415,7 @@ cargo-check-each-crate-macos:
414
415
- .collect-artifacts
415
416
- .pipeline-stopper-artifacts
416
417
before_script :
418
+ - !reference [.job-switcher, before_script]
417
419
- !reference [.rust-info-script, script]
418
420
- !reference [.pipeline-stopper-vars, script]
419
421
variables :
You can’t perform that action at this time.
0 commit comments