diff options
author | Emma Anholt <emma@anholt.net> | 2022-06-28 10:43:34 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-30 18:31:21 +0000 |
commit | 5cc71ac75fd538119b64d8a6bafe750fd4c6c4d5 (patch) | |
tree | 9e33ffbac1884e500d03a254b9ccd16fcc5160eb /.gitlab-ci.yml | |
parent | 9fc7d5e0e1ebe31d4377f0af13134b5aefa99212 (diff) | |
download | mesa-5cc71ac75fd538119b64d8a6bafe750fd4c6c4d5.tar.gz |
ci: Use "!references" to manage scheduled pipeline rules.
Because !references merging happens after yaml parsing, this lets us
remove a duplicated definition between .test-source-dep.yml and
.gitlab-ci.yml.
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17287>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aba7c1fc106..6615151271b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,12 +89,6 @@ stages: - layered-backends - deploy -# Generic rule to not run the job during scheduled pipelines -# ---------------------------------------------------------- -.scheduled_pipelines-rules: - rules: &ignore_scheduled_pipelines - if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"' - when: never # YAML anchors for rule conditions # -------------------------------- @@ -141,7 +135,7 @@ pages: - public needs: [] rules: - - *ignore_scheduled_pipelines + - !reference [.no_scheduled_pipelines-rules, rules] - if: *is-mesa-main changes: &docs-or-ci - docs/**/* @@ -156,7 +150,7 @@ test-docs: stage: deploy needs: [] rules: - - *ignore_scheduled_pipelines + - !reference [.no_scheduled_pipelines-rules, rules] - if: *is-forked-branch changes: *docs-or-ci when: manual @@ -180,7 +174,7 @@ test-docs-mr: # When to automatically run the CI .ci-run-policy: rules: - - *ignore_scheduled_pipelines + - !reference [.no_scheduled_pipelines-rules, rules] # If any files affecting the pipeline are changed, build/test jobs run # automatically once all dependency jobs have passed - changes: &all_paths @@ -224,7 +218,7 @@ test-docs-mr: extends: - .ci-run-policy rules: - - *ignore_scheduled_pipelines + - !reference [.no_scheduled_pipelines-rules, rules] # Run pipeline by default in the main project if any CI pipeline # configuration files were changed, to ensure docker images are up to date - if: *is-post-merge @@ -259,8 +253,7 @@ make git archive: - .fdo.ci-fairy stage: git-archive rules: - - if: *is-scheduled-pipeline - when: on_success + - !reference [.scheduled_pipeline-rules, rules] # ensure we are running on packet tags: - packet.net @@ -299,7 +292,7 @@ sanity: # pipelines. .test-manual-mr: rules: - - *ignore_scheduled_pipelines + - !reference [.no_scheduled_pipelines-rules, rules] - if: *is-forked-branch-or-pre-merge-not-for-marge changes: *all_paths |