From 5c5de4674e7e40c1bead3b0ddc1c55432ccf2cba Mon Sep 17 00:00:00 2001 From: vdovhanych Date: Wed, 12 Jul 2023 16:13:25 +0200 Subject: [PATCH] ci: allow jobs to be cancelled when redundant --- .gitlab-ci.yml | 4 ++++ ci/deploy.yml | 13 +++++++++++++ docs/ci/jobs.md | 24 ++++++++++++------------ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad833b7c58..f0e80f57c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,10 @@ stages: - posttest - deploy +default: + # Cancel jobs when a newer pipeline appears + interruptible: true + before_script: - . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh || true - $NIX_SHELL --run "poetry install --sync" diff --git a/ci/deploy.yml b/ci/deploy.yml index 20c51a43f8..32c8e8dfe1 100644 --- a/ci/deploy.yml +++ b/ci/deploy.yml @@ -8,6 +8,7 @@ release core fw regular deploy: DEPLOY_DIRECTORY: "releases/firmwares/tt" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - core fw regular build script: @@ -29,6 +30,7 @@ release core fw btconly deploy: DEPLOY_DIRECTORY: "releases/firmwares/tt" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - core fw btconly build script: @@ -50,6 +52,7 @@ release core fw regular debug deploy: DEPLOY_DIRECTORY: "releases/firmwares/tt" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - core fw regular debug build script: @@ -71,6 +74,7 @@ release core fw btconly debug deploy: DEPLOY_DIRECTORY: "releases/firmwares/tt" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - core fw btconly debug build script: @@ -94,6 +98,7 @@ release legacy fw regular deploy: DEPLOY_DIRECTORY: "releases/firmwares/t1" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - legacy fw regular build script: @@ -115,6 +120,7 @@ release legacy fw btconly deploy: DEPLOY_DIRECTORY: "releases/firmwares/t1" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - legacy fw btconly build script: @@ -136,6 +142,7 @@ release legacy fw regular debug deploy: DEPLOY_DIRECTORY: "releases/firmwares/t1" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - legacy fw regular debug build script: @@ -157,6 +164,7 @@ release legacy fw btconly debug deploy: DEPLOY_DIRECTORY: "releases/firmwares/t1" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - legacy fw btconly debug build script: @@ -180,6 +188,7 @@ release core unix debug deploy: DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - core unix frozen debug build - core unix frozen debug build arm @@ -205,6 +214,7 @@ release legacy unix debug deploy: DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - legacy emu regular debug build - legacy emu regular debug build arm @@ -233,6 +243,7 @@ ui tests fixtures deploy: BUCKET: "data.trezor.io" GIT_SUBMODULE_STRATEGY: "none" before_script: [] # no poetry + interruptible: false needs: - core click test - core device test @@ -258,6 +269,7 @@ sync emulators to aws: DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators/" BUCKET: "data.trezor.io" GIT_SUBMODULE_STRATEGY: "none" + interruptible: false before_script: [] # no poetry script: - source ${AWS_DEPLOY_DATA} @@ -285,6 +297,7 @@ common sync: GIT_DEPTH: 0 # avoid shallow clone only: - schedules + interruptible: false needs: [] before_script: [] # no poetry script: diff --git a/docs/ci/jobs.md b/docs/ci/jobs.md index 8cfee95f92..93f4c44425 100644 --- a/docs/ci/jobs.md +++ b/docs/ci/jobs.md @@ -283,28 +283,28 @@ Consists of **13 jobs** below: ### [release core fw regular deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L5) -### [release core fw btconly deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L26) +### [release core fw btconly deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L27) -### [release core fw regular debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L47) +### [release core fw regular debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L49) -### [release core fw btconly debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L68) +### [release core fw btconly debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L71) -### [release legacy fw regular deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L91) +### [release legacy fw regular deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L95) -### [release legacy fw btconly deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L112) +### [release legacy fw btconly deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L117) -### [release legacy fw regular debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L133) +### [release legacy fw regular debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L139) -### [release legacy fw btconly debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L154) +### [release legacy fw btconly debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L161) -### [release core unix debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L177) +### [release core unix debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L185) -### [release legacy unix debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L202) +### [release legacy unix debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L211) -### [ui tests fixtures deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L229) +### [ui tests fixtures deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L239) -### [sync emulators to aws](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L255) +### [sync emulators to aws](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L266) -### [common sync](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L280) +### [common sync](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L292) ---