From cb44e0d47c2ea63f60688a254f6018a8c435a554 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Apr 2022 12:08:40 -0400 Subject: gitlab-ci: distinguish release and development pipeline schedules Redefine the `CMAKE_CI_PACKAGE` pipeline schedule variable to indicate whether it is for a development version (`dev`) or a release version (`v[0-9]...`). Use this to automatically turn package upload jobs on or off without having to edit the jobs in `.gitlab-ci.yml` for release branches. --- .gitlab/rules.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to '.gitlab/rules.yml') diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml index a871b8f6f2..88aa8e6f94 100644 --- a/.gitlab/rules.yml +++ b/.gitlab/rules.yml @@ -2,7 +2,7 @@ .run_manually: rules: - - if: '$CMAKE_CI_PACKAGE == "true"' + - if: '$CMAKE_CI_PACKAGE != null' when: never - if: '$CMAKE_CI_NIGHTLY == "true"' when: on_success @@ -23,7 +23,7 @@ .run_automatically: rules: - - if: '$CMAKE_CI_PACKAGE == "true"' + - if: '$CMAKE_CI_PACKAGE != null' when: never - if: '$CMAKE_CI_NIGHTLY == "true"' when: on_success @@ -44,7 +44,7 @@ .run_dependent: rules: - - if: '$CMAKE_CI_PACKAGE == "true"' + - if: '$CMAKE_CI_PACKAGE != null' when: never - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_NIGHTLY_IGNORE_DEPS == "true")' when: always @@ -62,7 +62,11 @@ .run_only_for_package: rules: - - if: '$CMAKE_CI_PACKAGE == "true"' + - if: '$CMAKE_CI_PACKAGE != null && $CMAKE_CI_JOB_UPLOAD_PACKAGE == null' + when: on_success + - if: '$CMAKE_CI_PACKAGE == "dev" && $CMAKE_CI_JOB_UPLOAD_PACKAGE == "true"' + variables: + RSYNC_DESTINATION: "dev" when: on_success - when: never -- cgit v1.2.1