From 9a1b301c8564a75bb7781dfb9241c0bf7974f882 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Apr 2022 14:21:29 -0400 Subject: gitlab-ci: add sanity check to upload jobs Ensure that the upload destination is not empty. --- .gitlab/upload.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/upload.yml b/.gitlab/upload.yml index 88ceba8..20ec483 100644 --- a/.gitlab/upload.yml +++ b/.gitlab/upload.yml @@ -16,6 +16,7 @@ - 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/ kitware@cmake.org:$RSYNC_DESTINATION/ variables: @@ -37,4 +38,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/ kitware@cmake.org:$RSYNC_DESTINATION/ -- cgit v0.12 From 3a90800a9cc5b80f80e7139254776008cb9fa452 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Apr 2022 14:49:27 -0400 Subject: gitlab-ci: simplify package pipeline job conditions Use the job stage to distinguish upload jobs instead of an explicit variable. --- .gitlab/rules.yml | 6 +++--- .gitlab/upload.yml | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml index 88aa8e6..e4267d5 100644 --- a/.gitlab/rules.yml +++ b/.gitlab/rules.yml @@ -62,12 +62,12 @@ .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 != "upload"' + when: on_success - when: never .run_only_for_continuous_master: diff --git a/.gitlab/upload.yml b/.gitlab/upload.yml index 20ec483..a4cbbde 100644 --- a/.gitlab/upload.yml +++ b/.gitlab/upload.yml @@ -19,9 +19,6 @@ - test -n "$RSYNC_DESTINATION" - 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" -- cgit v0.12 From eb410615f232647912687bedb0239d0912273bac Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Apr 2022 14:55:05 -0400 Subject: gitlab-ci: start release package pipelines manually A release pipeline is always created by manual execution of a pipeline schedule. Require the initial pipeline jobs to be started manually too so that we can later add separate components to play separately. --- .gitlab/rules.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml index e4267d5..5642c15 100644 --- a/.gitlab/rules.yml +++ b/.gitlab/rules.yml @@ -66,6 +66,8 @@ 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 -- cgit v0.12