summaryrefslogtreecommitdiffstats
path: root/.gitlab
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-04 16:08:40 (GMT)
committerBrad King <brad.king@kitware.com>2022-04-04 17:23:37 (GMT)
commitcb44e0d47c2ea63f60688a254f6018a8c435a554 (patch)
tree1a5cc04be4fa5f7307bc5f56b0dc8b06bae1e885 /.gitlab
parent3a9a9a3ace76c2d3b8b08d60dc219bffcc619928 (diff)
downloadCMake-cb44e0d47c2ea63f60688a254f6018a8c435a554.zip
CMake-cb44e0d47c2ea63f60688a254f6018a8c435a554.tar.gz
CMake-cb44e0d47c2ea63f60688a254f6018a8c435a554.tar.bz2
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')
-rw-r--r--.gitlab/rules.yml12
-rw-r--r--.gitlab/upload.yml3
2 files changed, 11 insertions, 4 deletions
diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml
index a871b8f..88aa8e6 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
diff --git a/.gitlab/upload.yml b/.gitlab/upload.yml
index 287b105..88ceba8 100644
--- a/.gitlab/upload.yml
+++ b/.gitlab/upload.yml
@@ -18,6 +18,9 @@
- ssh-keygen -y -f $RSYNC_BINARY_KEY > $RSYNC_BINARY_KEY.pub
- rsync -tv --recursive -e "ssh -i $RSYNC_BINARY_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/ kitware@cmake.org:$RSYNC_DESTINATION/
+ variables:
+ CMAKE_CI_JOB_UPLOAD_PACKAGE: "true"
+
.rsync_upload_help:
stage: upload
image: "fedora:34"