Kaynağa Gözat

Merge topic 'ci-package-uploads'

b20a19fca1 Merge branch 'backport-3.22-ci-package-uploads' into ci-package-uploads
cb44e0d47c gitlab-ci: distinguish release and development pipeline schedules
3a9a9a3ace gitlab-ci: clarify name of package upload job template

Acked-by: Kitware Robot <[email protected]>
Merge-request: !7142
Brad King 3 yıl önce
ebeveyn
işleme
ffe699217c
4 değiştirilmiş dosya ile 18 ekleme ve 37 silme
  1. 5 15
      .gitlab-ci.yml
  2. 8 4
      .gitlab/rules.yml
  3. 4 1
      .gitlab/upload.yml
  4. 1 17
      Help/dev/maint.rst

+ 5 - 15
.gitlab-ci.yml

@@ -61,14 +61,12 @@ p:doc-package:
 
 
 u:source-package:
 u:source-package:
     extends:
     extends:
-        - .rsync_upload_binary
+        - .rsync_upload_package
         - .run_only_for_package
         - .run_only_for_package
     dependencies:
     dependencies:
         - p:source-package
         - p:source-package
     needs:
     needs:
         - p:source-package
         - p:source-package
-    variables:
-        RSYNC_DESTINATION: dev
 
 
 # Documentation builds
 # Documentation builds
 
 
@@ -605,14 +603,12 @@ b:linux-x86_64-package:
 
 
 u:linux-x86_64-package:
 u:linux-x86_64-package:
     extends:
     extends:
-        - .rsync_upload_binary
+        - .rsync_upload_package
         - .run_only_for_package
         - .run_only_for_package
     dependencies:
     dependencies:
         - b:linux-x86_64-package
         - b:linux-x86_64-package
     needs:
     needs:
         - b:linux-x86_64-package
         - b:linux-x86_64-package
-    variables:
-        RSYNC_DESTINATION: dev
 
 
 b:linux-aarch64-package:
 b:linux-aarch64-package:
     extends:
     extends:
@@ -629,14 +625,12 @@ b:linux-aarch64-package:
 
 
 u:linux-aarch64-package:
 u:linux-aarch64-package:
     extends:
     extends:
-        - .rsync_upload_binary
+        - .rsync_upload_package
         - .run_only_for_package
         - .run_only_for_package
     dependencies:
     dependencies:
         - b:linux-aarch64-package
         - b:linux-aarch64-package
     needs:
     needs:
         - b:linux-aarch64-package
         - b:linux-aarch64-package
-    variables:
-        RSYNC_DESTINATION: dev
 
 
 ## Sanitizer builds
 ## Sanitizer builds
 
 
@@ -770,14 +764,12 @@ b:macos-package:
 
 
 u:macos-package:
 u:macos-package:
     extends:
     extends:
-        - .rsync_upload_binary
+        - .rsync_upload_package
         - .run_only_for_package
         - .run_only_for_package
     dependencies:
     dependencies:
         - b:macos-package
         - b:macos-package
     needs:
     needs:
         - b:macos-package
         - b:macos-package
-    variables:
-        RSYNC_DESTINATION: dev
 
 
 b:macos10.10-package:
 b:macos10.10-package:
     extends:
     extends:
@@ -793,14 +785,12 @@ b:macos10.10-package:
 
 
 u:macos10.10-package:
 u:macos10.10-package:
     extends:
     extends:
-        - .rsync_upload_binary
+        - .rsync_upload_package
         - .run_only_for_package
         - .run_only_for_package
     dependencies:
     dependencies:
         - b:macos10.10-package
         - b:macos10.10-package
     needs:
     needs:
         - b:macos10.10-package
         - b:macos10.10-package
-    variables:
-        RSYNC_DESTINATION: dev
 
 
 # Windows builds
 # Windows builds
 
 

+ 8 - 4
.gitlab/rules.yml

@@ -2,7 +2,7 @@
 
 
 .run_manually:
 .run_manually:
     rules:
     rules:
-        - if: '$CMAKE_CI_PACKAGE == "true"'
+        - if: '$CMAKE_CI_PACKAGE != null'
           when: never
           when: never
         - if: '$CMAKE_CI_NIGHTLY == "true"'
         - if: '$CMAKE_CI_NIGHTLY == "true"'
           when: on_success
           when: on_success
@@ -23,7 +23,7 @@
 
 
 .run_automatically:
 .run_automatically:
     rules:
     rules:
-        - if: '$CMAKE_CI_PACKAGE == "true"'
+        - if: '$CMAKE_CI_PACKAGE != null'
           when: never
           when: never
         - if: '$CMAKE_CI_NIGHTLY == "true"'
         - if: '$CMAKE_CI_NIGHTLY == "true"'
           when: on_success
           when: on_success
@@ -44,7 +44,7 @@
 
 
 .run_dependent:
 .run_dependent:
     rules:
     rules:
-        - if: '$CMAKE_CI_PACKAGE == "true"'
+        - if: '$CMAKE_CI_PACKAGE != null'
           when: never
           when: never
         - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_NIGHTLY_IGNORE_DEPS == "true")'
         - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_NIGHTLY_IGNORE_DEPS == "true")'
           when: always
           when: always
@@ -64,7 +64,11 @@
 
 
 .run_only_for_package:
 .run_only_for_package:
     rules:
     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: on_success
         - when: never
         - when: never
 
 

+ 4 - 1
.gitlab/upload.yml

@@ -1,6 +1,6 @@
 # Steps for uploading artifacts
 # Steps for uploading artifacts
 
 
-.rsync_upload_binary:
+.rsync_upload_package:
     image: "fedora:35"
     image: "fedora:35"
     stage: upload
     stage: upload
     tags:
     tags:
@@ -18,6 +18,9 @@
         - ssh-keygen -y -f $RSYNC_BINARY_KEY > $RSYNC_BINARY_KEY.pub
         - 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/ [email protected]:$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:
 .rsync_upload_help:
     stage: upload
     stage: upload
     image: "fedora:35"
     image: "fedora:35"

+ 1 - 17
Help/dev/maint.rst

@@ -245,20 +245,6 @@ Commit with a message such as::
   Release versions do not have the development topic section of
   Release versions do not have the development topic section of
   the CMake Release Notes index page.
   the CMake Release Notes index page.
 
 
-Update ``.gitlab-ci.yml`` to drop the upload jobs from the
-packaging pipeline by renaming them to start in ``.``:
-
-.. code-block:: shell
-
-  sed -i 's/^u:/.u:/' .gitlab-ci.yml
-
-Commit with a message such as::
-
-  gitlab-ci: Drop package pipeline upload jobs for release branch
-
-  The package pipeline for release versions should not upload packages
-  automatically to our archive of nightly development versions.
-
 Update ``Source/CMakeVersion.cmake`` to set the version to
 Update ``Source/CMakeVersion.cmake`` to set the version to
 ``$major.$minor.0-rc0``:
 ``$major.$minor.0-rc0``:
 
 
@@ -290,15 +276,13 @@ Merge the ``release-$ver`` branch to ``master``:
   git merge --no-ff release-$ver
   git merge --no-ff release-$ver
 
 
 Begin post-release development by restoring the development branch release
 Begin post-release development by restoring the development branch release
-note infrastructure, the nightly package pipeline upload jobs, and
-the version date from ``origin/master``:
+note infrastructure, and the version date from ``origin/master``:
 
 
 .. code-block:: shell
 .. code-block:: shell
 
 
   git checkout origin/master -- \
   git checkout origin/master -- \
     Source/CMakeVersion.cmake Help/release/dev/0-sample-topic.rst
     Source/CMakeVersion.cmake Help/release/dev/0-sample-topic.rst
   sed -i $'/^Releases/ i\\\n.. include:: dev.txt\\\n' Help/release/index.rst
   sed -i $'/^Releases/ i\\\n.. include:: dev.txt\\\n' Help/release/index.rst
-  sed -i 's/^\.u:/u:/' .gitlab-ci.yml
 
 
 Update ``Source/CMakeVersion.cmake`` to set the version to
 Update ``Source/CMakeVersion.cmake`` to set the version to
 ``$major.$minor.$date``:
 ``$major.$minor.$date``: