JanZerebecki has uploaded a new change for review.
https://gerrit.wikimedia.org/r/239827
Change subject: Make sure that destination for publishers is ok
......................................................................
Make sure that destination for publishers is ok
I.e has no unset variabl. This also rewrites exising checks to use set -u so
that any unset variable will trigger an error.
Bug: T113195
Change-Id: I43f6fecc1120aeadae3656f61ac25d77ea2d5821
---
M jjb/publish.yaml
1 file changed, 5 insertions(+), 28 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/config
refs/changes/27/239827/1
diff --git a/jjb/publish.yaml b/jjb/publish.yaml
index 883b936..212d368 100644
--- a/jjb/publish.yaml
+++ b/jjb/publish.yaml
@@ -9,19 +9,11 @@
#
- builder:
name: doc-publish
- docsrc: '{docsrc}'
- docdest: '{docdest}'
builders:
# rsync folder to integration-publisher.eqiad.wmflabs
- shell: |
- if [ -z $ZUUL_UUID ]; then
- echo "Error: ZUUL_UUID must be set, aborting."
- exit 1
- fi
- if [ -z $DOC_SUBPATH ]; then
- echo "Error: DOC_SUBPATH must be set, aborting."
- exit 1
- fi
+ set -u
+ echo "Making sure that destination does not contain unset variables
(like DOC_DEST, see zuul/doc_functions.py): {docdest}"
rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$ZUUL_UUID"
echo
echo "Publishing to https://doc.wikimedia.org/{docdest}/"
@@ -44,15 +36,11 @@
#
- builder:
name: cover-publish
- docsrc: '{docsrc}'
- docdest: '{docdest}'
builders:
# rsync folder to integration-publisher.eqiad.wmflabs
- shell: |
- if [ -z $ZUUL_UUID ]; then
- echo "Error: ZUUL_UUID must be set, aborting."
- exit 1
- fi
+ set -u
+ echo "Making sure that destination does not contain unset variables
(like DOC_DEST, see zuul/doc_functions.py): {dest}"
rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$ZUUL_UUID"
echo
echo "Publishing to https://integration.wikimedia.org/cover/{dest}/"
@@ -103,18 +91,7 @@
echo "Zuul UUID: $ZUUL_UUID"
echo "..."
- shell: |
- if [ "$WMF_CI_PUB_DOCROOT" == "" ]; then
- echo "Error: WMF_CI_PUB_DOCROOT must be set, aborting."
- exit 1
- fi
- if [ "$WMF_CI_PUB_DEST" == "" ]; then
- echo "Error: WMF_CI_PUB_DEST must be set, aborting."
- exit 1
- fi
- if [ -z $ZUUL_UUID ]; then
- echo "Error: ZUUL_UUID must be set, aborting."
- exit 1
- fi
+ set -u
LOCAL_DOCROOT="/srv/$WMF_CI_PUB_DOCROOT"
if [ ! -d $LOCAL_DOCROOT ]; then
echo "Error: Invalid docroot. Directory $LOCAL_DOCROOT must exist,
aborting."
--
To view, visit https://gerrit.wikimedia.org/r/239827
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I43f6fecc1120aeadae3656f61ac25d77ea2d5821
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits