mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 04:07:57 +00:00
[ci] Improve cancel-pipeline job (#12008)
* [WIP][ci] Improve cancel-pipeline job * fix job name * test that fail works * debug cancel-pipeline * remove artifacts-false from cancel-pipeline jobs * split cancel pipeline jobs * fail test-linux-stable 2/3 * fail test-linux-stable 3/3 * fail cargo-check-benches 1/2 * fail cargo-check-benches 2/2 * fail test-linux-stable-int * fail cargo-check-subkey * fail check-tracing * fail check-tracing * fix pipeline
This commit is contained in:
committed by
GitHub
parent
2bda6abae7
commit
db2d66e59b
+46
-14
@@ -82,18 +82,31 @@ default:
|
||||
tags:
|
||||
- kubernetes-parity-build
|
||||
|
||||
.rust-info-script: &rust-info-script
|
||||
.rust-info-script:
|
||||
script:
|
||||
- rustup show
|
||||
- cargo --version
|
||||
- rustup +nightly show
|
||||
- cargo +nightly --version
|
||||
|
||||
.pipeline-stopper-vars:
|
||||
script:
|
||||
- echo "Collecting env variables for the cancel-pipeline job"
|
||||
- echo "FAILED_JOB_URL=${CI_JOB_URL}" > pipeline-stopper.env
|
||||
- echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env
|
||||
- echo "PR_NUM=${CI_COMMIT_REF_NAME}" >> pipeline-stopper.env
|
||||
|
||||
.pipeline-stopper-artifacts:
|
||||
artifacts:
|
||||
reports:
|
||||
dotenv: pipeline-stopper.env
|
||||
|
||||
.docker-env:
|
||||
image: "${CI_IMAGE}"
|
||||
before_script:
|
||||
- !reference [.rust-info-script, script]
|
||||
- !reference [.rusty-cachier, before_script]
|
||||
- !reference [.pipeline-stopper-vars, script]
|
||||
after_script:
|
||||
- !reference [.rusty-cachier, after_script]
|
||||
tags:
|
||||
@@ -246,35 +259,54 @@ rusty-cachier-notify:
|
||||
when: on_failure
|
||||
variables:
|
||||
PROJECT_ID: "${CI_PROJECT_ID}"
|
||||
PROJECT_NAME: "${CI_PROJECT_NAME}"
|
||||
PIPELINE_ID: "${CI_PIPELINE_ID}"
|
||||
trigger: "parity/infrastructure/ci_cd/pipeline-stopper"
|
||||
FAILED_JOB_URL: "${FAILED_JOB_URL}"
|
||||
FAILED_JOB_NAME: "${FAILED_JOB_NAME}"
|
||||
PR_NUM: "${PR_NUM}"
|
||||
trigger:
|
||||
project: "parity/infrastructure/ci_cd/pipeline-stopper"
|
||||
# remove branch, when pipeline-stopper for polakdot is updated to the same branch
|
||||
branch: "as-improve"
|
||||
|
||||
cancel-pipeline-test-linux-stable:
|
||||
# need to copy jobs this way because otherwise gitlab will wait
|
||||
# for all 3 jobs to finish instead of cancelling if one fails
|
||||
cancel-pipeline-test-linux-stable1:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: test-linux-stable
|
||||
artifacts: false
|
||||
- job: "test-linux-stable 1/3"
|
||||
|
||||
cancel-pipeline-test-linux-stable2:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: "test-linux-stable 2/3"
|
||||
|
||||
cancel-pipeline-test-linux-stable3:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: "test-linux-stable 3/3"
|
||||
|
||||
cancel-pipeline-cargo-check-benches1:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: "cargo-check-benches 1/2"
|
||||
|
||||
cancel-pipeline-cargo-check-benches2:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: "cargo-check-benches 2/2"
|
||||
|
||||
cancel-pipeline-test-linux-stable-int:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: test-linux-stable-int
|
||||
artifacts: false
|
||||
|
||||
cancel-pipeline-cargo-check-subkey:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: cargo-check-subkey
|
||||
artifacts: false
|
||||
|
||||
cancel-pipeline-cargo-check-benches:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: cargo-check-benches
|
||||
artifacts: false
|
||||
|
||||
cancel-pipeline-check-tracing:
|
||||
extends: .cancel-pipeline-template
|
||||
needs:
|
||||
- job: check-tracing
|
||||
artifacts: false
|
||||
|
||||
@@ -61,10 +61,12 @@ cargo-check-benches:
|
||||
- .docker-env
|
||||
- .test-refs
|
||||
- .collect-artifacts
|
||||
- .pipeline-stopper-artifacts
|
||||
before_script:
|
||||
# perform rusty-cachier operations before any further modifications to the git repo to make cargo feel cheated not so much
|
||||
- !reference [.rust-info-script, script]
|
||||
- !reference [.rusty-cachier, before_script]
|
||||
- !reference [.pipeline-stopper-vars, script]
|
||||
# merges in the master branch on PRs
|
||||
- if [ $CI_COMMIT_REF_NAME != "master" ]; then
|
||||
git fetch origin +master:master;
|
||||
@@ -131,6 +133,7 @@ cargo-check-subkey:
|
||||
extends:
|
||||
- .docker-env
|
||||
- .test-refs
|
||||
- .pipeline-stopper-artifacts
|
||||
script:
|
||||
- rusty-cachier snapshot create
|
||||
- cd ./bin/utils/subkey
|
||||
@@ -199,6 +202,7 @@ test-linux-stable:
|
||||
extends:
|
||||
- .docker-env
|
||||
- .test-refs
|
||||
- .pipeline-stopper-artifacts
|
||||
variables:
|
||||
# Enable debug assertions since we are running optimized builds for testing
|
||||
# but still want to have debug assertions.
|
||||
@@ -299,6 +303,7 @@ test-linux-stable-int:
|
||||
extends:
|
||||
- .docker-env
|
||||
- .test-refs
|
||||
- .pipeline-stopper-artifacts
|
||||
variables:
|
||||
# Enable debug assertions since we are running optimized builds for testing
|
||||
# but still want to have debug assertions.
|
||||
@@ -328,6 +333,7 @@ check-tracing:
|
||||
extends:
|
||||
- .docker-env
|
||||
- .test-refs
|
||||
- .pipeline-stopper-artifacts
|
||||
script:
|
||||
- rusty-cachier snapshot create
|
||||
# with-tracing must be explicitly activated, we run a test to ensure this works as expected in both cases
|
||||
|
||||
Reference in New Issue
Block a user