[MediaWiki-commits] [Gerrit] Publish scap docs without $ZUUL_UUID - change (integration/config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/251118 Change subject: Publish scap docs without $ZUUL_UUID .. Publish scap docs without $ZUUL_UUID Creates a new job for `mw-tools-scap-tox-doc-publish` so scap docs can be generated from the canonical repo on diffusion. Replaces the use of the `$ZUUL_UUID` in the doc publish docs with a uuid from `/proc/kernel/random/uuid` Bug: T117770 Change-Id: Ib4753ad493115682d902cf15136199fd2083b8e5 --- M jjb/mediawiki-tools.yaml M jjb/publish.yaml 2 files changed, 41 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/18/251118/1 diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml index deb8285..48fd93d 100644 --- a/jjb/mediawiki-tools.yaml +++ b/jjb/mediawiki-tools.yaml @@ -5,12 +5,26 @@ docsrc: 'html' docdest: 'mw-tools-releng' -- project: -name: 'mw-tools-scap' -jobs: - - '{name}-tox-doc-publish': -docsrc: 'docs/_build/html' -docdest: 'mw-tools-scap' +# Job that updates scap docs on doc.wikimedia.org hourly +- job: +name: 'mw-tools-scap-tox-doc-publish' +node: contintLabsSlave && UbuntuPrecise +triggers: + - pollscm: + cron: '@hourly' + ignore-post-commit-hooks: True +scm: + - git: + url: 'https://phabricator.wikimedia.org/diffusion/MSCA/scap' + branches: +- 'origin/master' + wipe-workspace: true +builders: + - tox: + venv: doc + - doc-publish: + docsrc: 'docs/_build/html' + docdest: 'mw-tools-scap' # Job to run MW-CS patchsets against # mediwiki/core's includes/ directory for easier diff --git a/jjb/publish.yaml b/jjb/publish.yaml index 86dd5b3..0be5cf9 100644 --- a/jjb/publish.yaml +++ b/jjb/publish.yaml @@ -14,8 +14,9 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {docdest}" - [ $ZUUL_UUID ] - rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" + UUID=$(cat /proc/sys/kernel/random/uuid) + [ $UUID ] + rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$UUID" echo echo "Publishing to https://doc.wikimedia.org/{docdest}/; - trigger-builds: @@ -25,6 +26,7 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/doc WMF_CI_PUB_DEST={docdest} + UUID=${UUID} # Sync files from a Jenkins slave in labs to a central rsync server from which # another job (executing on gallium) can pull in the files and publish them @@ -42,8 +44,9 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {dest}" - [ $ZUUL_UUID ] - rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" + UUID=$(cat /proc/sys/kernel/random/uuid) + [ $UUID ] + rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$UUID" echo echo "Publishing to https://integration.wikimedia.org/cover/{dest}/; - trigger-builds: @@ -53,6 +56,7 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/integration WMF_CI_PUB_DEST=cover/{dest} + UUID=${UUID} # rsync a directory from integration-publisher.eqiad.wmflabs to a website on gallium. # @@ -66,7 +70,7 @@ # * docroot: org/wikimedia/integration # * dest: cover/PROJECT # -# Uses $ZUUL_UUID as a unique identifier. +# Uses $UUID as a unique identifier. - job: name: publish-on-gallium node: gallium @@ -84,17 +88,21 @@ # WILL be auto-created if non-existent. name: 'WMF_CI_PUB_DEST' description: 'Sub directory path under the chosen document root, such as "mediawiki-core/DOC_SUBPATH/js"' + - string: + # Passed from upstream jobs + name: 'UUID' + description: 'Directory on integration-publisher/doc rsync server from which generated documentation is fetched' triggers: - zuul builders: - shell: | set -u - echo "Publishing $ZUUL_PROJECT from labs to prod" - echo "Zuul UUID: $ZUUL_UUID" + echo "Publishing $WMF_CI_PUB_DEST from labs to prod" + echo "UUID: $UUID" echo "..." - [ $ZUUL_UUID ] + [ $UUID ] LOCAL_DOCROOT="/srv/$WMF_CI_PUB_DOCROOT" if [ ! -d $LOCAL_DOCROOT ]; then echo "Error: Invalid docroot. Directory $LOCAL_DOCROOT must exist, aborting." @@ -102,7 +110,7 @@ fi LOCAL_DEST="$LOCAL_DOCROOT/$WMF_CI_PUB_DEST" mkdir -p "$LOCAL_DEST" - rsync --recursive --delete-after "rsync://10.68.16.255/doc/$ZUUL_UUID"/
[MediaWiki-commits] [Gerrit] Publish scap docs without $ZUUL_UUID - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Publish scap docs without $ZUUL_UUID .. Publish scap docs without $ZUUL_UUID Creates a new job for `mw-tools-scap-tox-doc-publish` so scap docs can be generated from the canonical repo on diffusion. Replaces the use of the `$ZUUL_UUID` in the doc publish docs with a uuid from `/proc/kernel/random/uuid` Bug: T117770 Change-Id: Ib4753ad493115682d902cf15136199fd2083b8e5 --- M jjb/mediawiki-tools.yaml M jjb/publish.yaml 2 files changed, 39 insertions(+), 19 deletions(-) Approvals: 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml index deb8285..dfdceb3 100644 --- a/jjb/mediawiki-tools.yaml +++ b/jjb/mediawiki-tools.yaml @@ -5,12 +5,24 @@ docsrc: 'html' docdest: 'mw-tools-releng' -- project: -name: 'mw-tools-scap' -jobs: - - '{name}-tox-doc-publish': -docsrc: 'docs/_build/html' -docdest: 'mw-tools-scap' +# Job that updates scap docs on doc.wikimedia.org hourly +- job: +name: 'mw-tools-scap-tox-doc-publish' +node: contintLabsSlave && UbuntuPrecise +triggers: + - pollscm: '@hourly' +scm: + - git: + url: 'https://phabricator.wikimedia.org/diffusion/MSCA/scap' + branches: +- 'origin/master' + wipe-workspace: true +builders: + - tox: + venv: doc + - doc-publish: + docsrc: 'docs/_build/html' + docdest: 'mw-tools-scap' # Job to run MW-CS patchsets against # mediwiki/core's includes/ directory for easier diff --git a/jjb/publish.yaml b/jjb/publish.yaml index 86dd5b3..3a93f6b 100644 --- a/jjb/publish.yaml +++ b/jjb/publish.yaml @@ -14,8 +14,9 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {docdest}" - [ $ZUUL_UUID ] - rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" + UUID=$(cat /proc/sys/kernel/random/uuid) + [ $UUID ] + rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$UUID" echo echo "Publishing to https://doc.wikimedia.org/{docdest}/; - trigger-builds: @@ -25,6 +26,7 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/doc WMF_CI_PUB_DEST={docdest} + UUID=$UUID # Sync files from a Jenkins slave in labs to a central rsync server from which # another job (executing on gallium) can pull in the files and publish them @@ -42,8 +44,9 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {dest}" - [ $ZUUL_UUID ] - rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" + UUID=$(cat /proc/sys/kernel/random/uuid) + [ $UUID ] + rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$UUID" echo echo "Publishing to https://integration.wikimedia.org/cover/{dest}/; - trigger-builds: @@ -53,6 +56,7 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/integration WMF_CI_PUB_DEST=cover/{dest} + UUID=$UUID # rsync a directory from integration-publisher.eqiad.wmflabs to a website on gallium. # @@ -66,7 +70,7 @@ # * docroot: org/wikimedia/integration # * dest: cover/PROJECT # -# Uses $ZUUL_UUID as a unique identifier. +# Uses $UUID as a unique identifier. - job: name: publish-on-gallium node: gallium @@ -84,17 +88,21 @@ # WILL be auto-created if non-existent. name: 'WMF_CI_PUB_DEST' description: 'Sub directory path under the chosen document root, such as "mediawiki-core/DOC_SUBPATH/js"' + - string: + # Passed from upstream jobs + name: 'UUID' + description: 'Directory on integration-publisher/doc rsync server from which generated documentation is fetched' triggers: - zuul builders: - shell: | set -u - echo "Publishing $ZUUL_PROJECT from labs to prod" - echo "Zuul UUID: $ZUUL_UUID" + echo "Publishing $WMF_CI_PUB_DEST from labs to prod" + echo "UUID: $UUID" echo "..." - [ $ZUUL_UUID ] + [ $UUID ] LOCAL_DOCROOT="/srv/$WMF_CI_PUB_DOCROOT" if [ ! -d $LOCAL_DOCROOT ]; then echo "Error: Invalid docroot. Directory $LOCAL_DOCROOT must exist, aborting." @@ -102,7 +110,7 @@ fi LOCAL_DEST="$LOCAL_DOCROOT/$WMF_CI_PUB_DEST" mkdir -p "$LOCAL_DEST" - rsync --recursive --delete-after "rsync://10.68.16.255/doc/$ZUUL_UUID"/ "$LOCAL_DEST" + rsync --recursive --delete-after "rsync://10.68.16.255/doc/$UUID"/ "$LOCAL_DEST"