diff --git a/.zuul.yaml b/.zuul.yaml index 2cd7c3281f..328ee40e39 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -18,6 +18,14 @@ post-run: playbooks/build-manuals-tox/post.yaml roles: - zuul: openstack-infra/zuul-jobs + vars: + tox_environment: + # The tox job writes the root-marker file directly and thus + # needs the following variables set: + ZUUL_PROJECT: '{{ zuul.project.name }}' + ZUUL_BRANCH: '{{ zuul.branch }}' + ZUUL_UUID: '{{ zuul.build }}' + ZUUL_NEWREF: '{{ zuul.ref }}' - job: name: build-tox-manuals-checkbuild diff --git a/tools/build-all-rst.sh b/tools/build-all-rst.sh index 68c59ae227..924c40d967 100755 --- a/tools/build-all-rst.sh +++ b/tools/build-all-rst.sh @@ -3,13 +3,13 @@ mkdir -p publish-docs # Set this to a sensible value if not set by OpenStack CI. -if [ -z "$ZUUL_REFNAME" ] ; then - ZUUL_REFNAME="master" +if [ -z "$ZUUL_BRANCH" ] ; then + ZUUL_BRANCH="master" fi # This marker is needed for infra publishing. # Note for stable branches, this needs to be the top of each manual. -MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID Revision: $ZUUL_NEWREV" +MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_BRANCH Build: $ZUUL_UUID Revision: $ZUUL_NEWREV" LINKCHECK="" PDF_OPTION="" @@ -44,6 +44,6 @@ for guide in arch-design doc-contrib-guide glossary \ done # For master, just mark the root -if [ "$ZUUL_REFNAME" = "master" ] ; then +if [ "$ZUUL_BRANCH" = "master" ] ; then echo $MARKER_TEXT > publish-docs/.root-marker fi diff --git a/tox.ini b/tox.ini index 6fc72644b8..e6f1ea568d 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ basepython=python2.7 setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/test-requirements.txt +passenv = ZUUL_* whitelist_externals = bash cp