Skip to content

Commit

Permalink
ci: enable cache jobs on regular "main" pipelines
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
marmarek committed Dec 22, 2024
1 parent 11e1eec commit a8d4ec8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a8d4ec8

Please sign in to comment.