Browse Source

Merge topic 'ci-release-manual'

eb410615f2 gitlab-ci: start release package pipelines manually
3a90800a9c gitlab-ci: simplify package pipeline job conditions
9a1b301c85 gitlab-ci: add sanity check to upload jobs

Acked-by: Kitware Robot <[email protected]>
Merge-request: !7143
Brad King 3 years ago
parent
commit
c7bc763d58
2 changed files with 7 additions and 6 deletions
  1. 5 3
      .gitlab/rules.yml
  2. 2 3
      .gitlab/upload.yml

+ 5 - 3
.gitlab/rules.yml

@@ -64,12 +64,14 @@
 
 .run_only_for_package:
     rules:
-        - 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"'
+        - if: '$CMAKE_CI_PACKAGE == "dev"'
           variables:
               RSYNC_DESTINATION: "dev"
           when: on_success
+        - if: '$CMAKE_CI_PACKAGE != null && $CI_JOB_STAGE == "prep"'
+          when: manual
+        - if: '$CMAKE_CI_PACKAGE != null && $CI_JOB_STAGE != "upload"'
+          when: on_success
         - when: never
 
 .run_only_for_continuous_master:

+ 2 - 3
.gitlab/upload.yml

@@ -16,11 +16,9 @@
         - dnf install -y --setopt=install_weak_deps=False rsync openssh-clients
         - chmod 400 $RSYNC_BINARY_KEY
         - ssh-keygen -y -f $RSYNC_BINARY_KEY > $RSYNC_BINARY_KEY.pub
+        - test -n "$RSYNC_DESTINATION"
         - rsync -tv --recursive -e "ssh -i $RSYNC_BINARY_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/ [email protected]:$RSYNC_DESTINATION/
 
-    variables:
-        CMAKE_CI_JOB_UPLOAD_PACKAGE: "true"
-
 .rsync_upload_help:
     stage: upload
     image: "fedora:35"
@@ -37,4 +35,5 @@
         - dnf install -y --setopt=install_weak_deps=False rsync openssh-clients
         - chmod 400 $RSYNC_HELP_KEY
         - ssh-keygen -y -f $RSYNC_HELP_KEY > $RSYNC_HELP_KEY.pub
+        - test -n "$RSYNC_DESTINATION"
         - rsync -tv --recursive --delete -e "ssh -i $RSYNC_HELP_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/html/ [email protected]:$RSYNC_DESTINATION/