From 2863fbc8b215829cc38c13e408444706c2433332 Mon Sep 17 00:00:00 2001 From: David Runge <dvzrv@archlinux.org> Date: Mon, 17 Mar 2025 15:55:02 +0100 Subject: [PATCH 1/3] ci(GitLab): Remove unnecessary extension `.mr-default` Signed-off-by: David Runge <dvzrv@archlinux.org> --- .gitlab-ci.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b5b4c75..47c42c0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,17 +31,8 @@ stages: - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH -# default setup running in MRs -.mr-default: - before_script: - - pacman-key --init - - pacman -Sy --needed --noconfirm archlinux-keyring - - source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - check-commits: - extends: .mr-default + extends: .all-default script: # fetch the default branch as we need it for comparison - git fetch origin $CI_DEFAULT_BRANCH @@ -49,6 +40,8 @@ check-commits: - git config --local user.name "Foobar McFooface" - git config --local user.email "foobar@mcfooface.com" - just check-commits + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" stage: check spelling: -- GitLab From 4646ce5facefe8b6727fe8cd8f1fe1a1a8322baf Mon Sep 17 00:00:00 2001 From: David Runge <dvzrv@archlinux.org> Date: Mon, 17 Mar 2025 15:56:02 +0100 Subject: [PATCH 2/3] ci(GitLab): Rename extensions for targets for brevity Signed-off-by: David Runge <dvzrv@archlinux.org> --- .gitlab-ci.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 47c42c0f..c07b39ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ stages: - pages # default setup running on default branch and in MRs -.all-default: +.default: before_script: - pacman-key --init - pacman -Sy --needed --noconfirm archlinux-keyring @@ -21,7 +21,7 @@ stages: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # default setup with Rust tools running on default branch and in MRs -.all-default-rust: +.default-rust: before_script: - pacman-key --init - pacman -Sy --needed --noconfirm archlinux-keyring @@ -32,7 +32,7 @@ stages: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH check-commits: - extends: .all-default + extends: .default script: # fetch the default branch as we need it for comparison - git fetch origin $CI_DEFAULT_BRANCH @@ -45,55 +45,55 @@ check-commits: stage: check spelling: - extends: .all-default + extends: .default script: - just check-spelling stage: check formatting: - extends: .all-default-rust + extends: .default-rust script: - just check-formatting stage: check lint: - extends: .all-default-rust + extends: .default-rust script: - just lint stage: check unused-deps: - extends: .all-default-rust + extends: .default-rust script: - just check-unused-deps stage: check dependencies: - extends: .all-default-rust + extends: .default-rust script: - just check-dependencies stage: check licenses: - extends: .all-default-rust + extends: .default-rust script: - just check-licenses stage: check links: - extends: .all-default-rust + extends: .default-rust script: - just check-links stage: check test: - extends: .all-default-rust + extends: .default-rust script: - just test stage: test integration-test: - extends: .all-default + extends: .default script: - useradd -m testuser - chown -R testuser:testuser . @@ -103,7 +103,7 @@ integration-test: - vm test-readmes: - extends: .all-default + extends: .default script: - useradd -m testuser - chown -R testuser:testuser . @@ -113,7 +113,7 @@ test-readmes: - vm build-image: - extends: .all-default + extends: .default script: - useradd -m testuser - chown -R testuser:testuser . @@ -127,7 +127,7 @@ build-image: - vm build-test-image: - extends: .all-default + extends: .default script: - useradd -m testuser - chown -R testuser:testuser . -- GitLab From f8228a66197cd0f381653618eea83150197f784f Mon Sep 17 00:00:00 2001 From: David Runge <dvzrv@archlinux.org> Date: Mon, 17 Mar 2025 15:57:29 +0100 Subject: [PATCH 3/3] ci(GitLab): Render all targets interruptible to conserve resources Signed-off-by: David Runge <dvzrv@archlinux.org> --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c07b39ca..b29e828f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,7 @@ stages: - pacman -Sy --needed --noconfirm archlinux-keyring - source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES - just install-rust-dev-tools + interruptible: true rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH @@ -27,6 +28,7 @@ stages: - pacman -Sy --needed --noconfirm archlinux-keyring - source .env && pacman -Syu --needed --noconfirm $PACMAN_PACKAGES - just install-rust-dev-tools + interruptible: true rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH -- GitLab