Преглед на файлове

gitlab-ci: add jobs to upload cmake.org/cmake/help/git-{master,stage} docs

Brad King преди 4 години
родител
ревизия
a5a4b0b6ab
променени са 2 файла, в които са добавени 39 реда и са изтрити 0 реда
  1. 22 0
      .gitlab-ci.yml
  2. 17 0
      .gitlab/upload.yml

+ 22 - 0
.gitlab-ci.yml

@@ -70,11 +70,33 @@ build:help:master:
         - .cmake_org_help
         - .run_only_for_continuous_master
 
+upload:help:master:
+    extends:
+        - .rsync_upload_help
+        - .run_only_for_continuous_master
+    variables:
+        RSYNC_DESTINATION: git-master
+    dependencies:
+        - build:help:master
+    needs:
+        - build:help:master
+
 build:help:stage:
     extends:
         - .cmake_org_help
         - .run_only_for_continuous_stage
 
+upload:help:stage:
+    extends:
+        - .rsync_upload_help
+        - .run_only_for_continuous_stage
+    variables:
+        RSYNC_DESTINATION: git-stage
+    dependencies:
+        - build:help:stage
+    needs:
+        - build:help:stage
+
 # Lint builds
 
 build:debian10-iwyu:

+ 17 - 0
.gitlab/upload.yml

@@ -16,3 +16,20 @@
         - chmod 400 $RSYNC_BINARY_KEY
         - 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_upload_help:
+    stage: upload
+    image: "fedora:33"
+    tags:
+        - docker
+        - linux
+        - build
+    environment:
+        name: rsync-upload
+
+    script:
+        - ls build/html/index.html
+        - 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
+        - rsync -tv --recursive --delete -e "ssh -i $RSYNC_HELP_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/html/ [email protected]:$RSYNC_DESTINATION/