From ff7431a3c67543e4181a6f8d6eb9478e0afcb90e Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 16 Nov 2022 12:05:58 +0100 Subject: [PATCH 1/7] [ci] Improve pipeline stopper --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75a1d54776eb6..d4b98db13b77b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -280,6 +280,22 @@ rusty-cachier-notify: PR_NUM: "${PR_NUM}" trigger: project: "parity/infrastructure/ci_cd/pipeline-stopper" + branch: "as-improve" + +remove-cancel-pipeline-message: + stage: .post + rules: + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + variables: + PROJECT_ID: "${CI_PROJECT_ID}" + PROJECT_NAME: "${CI_PROJECT_NAME}" + PIPELINE_ID: "${CI_PIPELINE_ID}" + FAILED_JOB_URL: "https://gitlab.com" + FAILED_JOB_NAME: "nope" + PR_NUM: "${CI_COMMIT_REF_NAME}" + trigger: + project: "parity/infrastructure/ci_cd/pipeline-stopper" + branch: "as-improve" # need to copy jobs this way because otherwise gitlab will wait # for all 3 jobs to finish instead of cancelling if one fails From fb9a4983b1593a40a622e426eeb21dc7edbc7d61 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 16 Nov 2022 12:07:20 +0100 Subject: [PATCH 2/7] break test-linux-stable 1/3 --- scripts/ci/gitlab/pipeline/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index 710fbe6227f46..93413b981f77c 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -226,6 +226,7 @@ test-linux-stable: # tests are partitioned by nextest and executed in parallel on $CI_NODE_TOTAL runners # node-cli is excluded until https://github.com/paritytech/substrate/issues/11321 fixed - echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}" + - - if [ ${CI_NODE_INDEX} == 1 ]; then exit 1; fi - time cargo nextest run --workspace --locked --release From 7944810faa0905fc3660bae2c73ab7ad7f48add7 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 16 Nov 2022 12:14:20 +0100 Subject: [PATCH 3/7] break test-linux-stable 2/3 --- scripts/ci/gitlab/pipeline/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index 93413b981f77c..fe61dab37e13b 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -226,7 +226,7 @@ test-linux-stable: # tests are partitioned by nextest and executed in parallel on $CI_NODE_TOTAL runners # node-cli is excluded until https://github.com/paritytech/substrate/issues/11321 fixed - echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}" - - - if [ ${CI_NODE_INDEX} == 1 ]; then exit 1; fi + - - if [ ${CI_NODE_INDEX} == 2 ]; then exit 1; fi - time cargo nextest run --workspace --locked --release From 0042da8897a208535ab91448af4eb40f90303572 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 16 Nov 2022 12:19:19 +0100 Subject: [PATCH 4/7] break test-linux-stable 3/3 --- scripts/ci/gitlab/pipeline/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index fe61dab37e13b..eb9d4d9b35de3 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -226,7 +226,7 @@ test-linux-stable: # tests are partitioned by nextest and executed in parallel on $CI_NODE_TOTAL runners # node-cli is excluded until https://github.com/paritytech/substrate/issues/11321 fixed - echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}" - - - if [ ${CI_NODE_INDEX} == 2 ]; then exit 1; fi + - - if [ ${CI_NODE_INDEX} == 3 ]; then exit 1; fi - time cargo nextest run --workspace --locked --release From a1b2f61fb37c8bfe915a1a489ca55787729523eb Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 16 Nov 2022 12:25:53 +0100 Subject: [PATCH 5/7] break cargo-check-benches 1/2 --- scripts/ci/gitlab/pipeline/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index eb9d4d9b35de3..2e624cc443ce8 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -83,6 +83,7 @@ cargo-check-benches: - mkdir -p ./artifacts/benches/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA # this job is executed in parallel on two runners - echo "___Running benchmarks___"; + - if [ ${CI_NODE_INDEX} == 1 ]; then exit 1; fi - case ${CI_NODE_INDEX} in 1) SKIP_WASM_BUILD=1 time cargo +nightly check --locked --benches --all; @@ -226,7 +227,6 @@ test-linux-stable: # tests are partitioned by nextest and executed in parallel on $CI_NODE_TOTAL runners # node-cli is excluded until https://github.com/paritytech/substrate/issues/11321 fixed - echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}" - - - if [ ${CI_NODE_INDEX} == 3 ]; then exit 1; fi - time cargo nextest run --workspace --locked --release From d344b02d0da37c66949cb4640502ae11cdedeb42 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 16 Nov 2022 12:29:44 +0100 Subject: [PATCH 6/7] break cargo-check-benches 2/2 --- scripts/ci/gitlab/pipeline/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index 2e624cc443ce8..f2290c9d213c6 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -83,7 +83,7 @@ cargo-check-benches: - mkdir -p ./artifacts/benches/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA # this job is executed in parallel on two runners - echo "___Running benchmarks___"; - - if [ ${CI_NODE_INDEX} == 1 ]; then exit 1; fi + - if [ ${CI_NODE_INDEX} == 2 ]; then exit 1; fi - case ${CI_NODE_INDEX} in 1) SKIP_WASM_BUILD=1 time cargo +nightly check --locked --benches --all; From 4589e44698814e990100eee7a5426a0a9bc7bfb4 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 16 Nov 2022 13:54:55 +0100 Subject: [PATCH 7/7] fix benches --- scripts/ci/gitlab/pipeline/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index f2290c9d213c6..710fbe6227f46 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -83,7 +83,6 @@ cargo-check-benches: - mkdir -p ./artifacts/benches/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA # this job is executed in parallel on two runners - echo "___Running benchmarks___"; - - if [ ${CI_NODE_INDEX} == 2 ]; then exit 1; fi - case ${CI_NODE_INDEX} in 1) SKIP_WASM_BUILD=1 time cargo +nightly check --locked --benches --all;