diff options
author | Brad King <brad.king@kitware.com> | 2022-04-04 12:08:40 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-04-04 13:23:37 -0400 |
commit | cb44e0d47c2ea63f60688a254f6018a8c435a554 (patch) | |
tree | 1a5cc04be4fa5f7307bc5f56b0dc8b06bae1e885 /.gitlab/rules.yml | |
parent | 3a9a9a3ace76c2d3b8b08d60dc219bffcc619928 (diff) | |
download | cmake-cb44e0d47c2ea63f60688a254f6018a8c435a554.tar.gz |
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.
Diffstat (limited to '.gitlab/rules.yml')
-rw-r--r-- | .gitlab/rules.yml | 12 |
1 files changed, 8 insertions, 4 deletions
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 |