From a8d4ec80a2a9fb6c33374c37b4e003e463beaeba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 22 Dec 2024 02:41:47 +0100 Subject: [PATCH] ci: enable cache jobs on regular "main" pipelines Scheduled pipelines on the "main" branch have cache jobs enabled, and those jobs are used by more or less all pipelines in other repos for quicker run. Do this for ordinary "main" pipelines too, otherwise all jobs won't use a cache for a week after merging anything to the builderv2 repo. --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 806440c8..76c5b207 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,6 +20,8 @@ variables: description: "Run components jobs, default: 0" CI_RUN_TEMPLATE_JOBS: description: "Run template jobs, default: 0" + CI_RUN_CACHE_JOBS: + description: "Run cache jobs, subset of CI_RUN_COMPONENT_JOBS, default: 0" CI_RUN_ISO_JOBS: description: "Run ISO jobs, default: 0" CI_RUN_INFRA_JOBS: @@ -75,7 +77,7 @@ builderv2-github: .init_cache_job: rules: - - if: $CI_RUN_CACHE_JOBS == "1" || $CI_RUN_COMPONENT_JOBS == "1" || $CI_RUN_ALL_JOBS == "1" + - if: $CI_RUN_CACHE_JOBS == "1" || $CI_RUN_COMPONENT_JOBS == "1" || $CI_RUN_ALL_JOBS == "1" || $CI_COMMIT_BRANCH == "main" when: always - when: never stage: prep