Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/173016

Change subject: Make sure ZUUL_UUID is present when syncing doc
......................................................................

Make sure ZUUL_UUID is present when syncing doc

When triggering a job manually, we might not set ZUUL_UUID which would
cause rsync to delete everything on the publisher AND on
https://doc.wikimedia.org/

Abort publish process whenever ZUUL_UUID is not set.

Change-Id: If2c0840d54a400e9999efa20128dce89ff3b9220
---
M jjb/doc.yaml
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/16/173016/1

diff --git a/jjb/doc.yaml b/jjb/doc.yaml
index 2c2491a..172d777 100644
--- a/jjb/doc.yaml
+++ b/jjb/doc.yaml
@@ -18,6 +18,11 @@
     builders:
      # rsync {docsrc} folder to integration-publisher.eqiad.wmflabs
      - shell: |
+         if [ -z $ZUUL_UUID ]; then
+            echo "Parameter \$ZUUL_UUID is missing!"
+            echo "Can not rsync the documentation, aborting."
+            exit 1
+         fi
          rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$ZUUL_UUID"
      # rsync folder to doc.wikimedia.org
      - trigger-builds:
@@ -52,6 +57,11 @@
              echo "WMF_CI_DOC_DEST parameter is empty. Aborting"
              exit 1
          fi
+         if [ -z $ZUUL_UUID ]; then
+            echo "Parameter \$ZUUL_UUID is missing!"
+            echo "Can not rsync the documentation, aborting."
+            exit 1
+         fi
          rsync --recursive --delete-after 
"rsync://10.68.16.255/doc/$ZUUL_UUID"/ "/srv/org/wikimedia/doc/$WMF_CI_DOC_DEST"
      - shell: |
          set +x

-- 
To view, visit https://gerrit.wikimedia.org/r/173016
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2c0840d54a400e9999efa20128dce89ff3b9220
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to