From 2a5100cdb37681f9c197bf7bc2895c929bd6a620 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Tue, 13 Dec 2022 17:42:10 +0100 Subject: [PATCH 1/4] [ci] add job switcher --- .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01763a13d9c7..e710651d84cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,6 +68,7 @@ default: # they will be used if the job fails .pipeline-stopper-vars: before_script: + - !reference [.job-switcher, before_script] - echo "FAILED_JOB_URL=${CI_JOB_URL}" > pipeline-stopper.env - echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env - echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env @@ -78,6 +79,10 @@ default: reports: dotenv: pipeline-stopper.env +.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 + .kubernetes-env: image: "${CI_IMAGE}" tags: @@ -90,6 +95,7 @@ default: .compiler-info: before_script: + - !reference [.job-switcher, before_script] - rustup show - cargo --version @@ -144,6 +150,7 @@ default: .build-push-image: before_script: + - !reference [.job-switcher, before_script] - test -s ./artifacts/VERSION || exit 1 - test -s ./artifacts/EXTRATAG || exit 1 - VERSION="$(cat ./artifacts/VERSION)" @@ -230,7 +237,6 @@ remove-cancel-pipeline-message: PR_NUM: "${CI_COMMIT_REF_NAME}" trigger: project: "parity/infrastructure/ci_cd/pipeline-stopper" - branch: "as-improve" cancel-pipeline-test-linux-stable: extends: .cancel-pipeline-template From 0ec637b715a0a5966ed67f6f61d4895131f69b0c Mon Sep 17 00:00:00 2001 From: alvicsam Date: Tue, 13 Dec 2022 17:45:17 +0100 Subject: [PATCH 2/4] add before_script to docker and k8s runners --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e710651d84cc..eec579c1b58b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,11 +85,15 @@ default: .kubernetes-env: image: "${CI_IMAGE}" + before_script: + - !reference [.job-switcher, before_script] tags: - kubernetes-parity-build .docker-env: image: "${CI_IMAGE}" + before_script: + - !reference [.job-switcher, before_script] tags: - linux-docker From e41a4ec32407461a0ded501e264625c296ee9f5b Mon Sep 17 00:00:00 2001 From: alvicsam Date: Tue, 13 Dec 2022 17:52:44 +0100 Subject: [PATCH 3/4] upd runners --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eec579c1b58b..6d9300ba93a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,7 +95,7 @@ default: before_script: - !reference [.job-switcher, before_script] tags: - - linux-docker + - linux-docker-vm-c2 .compiler-info: before_script: From ddb7d999cc43f5b7bdc49d93c1c17edcfbeeb372 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Tue, 13 Dec 2022 18:27:27 +0100 Subject: [PATCH 4/4] sccache :( --- scripts/ci/gitlab/pipeline/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/ci/gitlab/pipeline/build.yml b/scripts/ci/gitlab/pipeline/build.yml index 454e6289aa43..c1ec964e96b2 100644 --- a/scripts/ci/gitlab/pipeline/build.yml +++ b/scripts/ci/gitlab/pipeline/build.yml @@ -74,7 +74,6 @@ build-test-collators: script: - time cargo build --profile testnet --verbose -p test-parachain-adder-collator - time cargo build --profile testnet --verbose -p test-parachain-undying-collator - - sccache -s # pack artifacts - mkdir -p ./artifacts - mv ./target/testnet/adder-collator ./artifacts/.