Fix translation AFS publishing

Add marker correctly, we cannot redirect in tox.ini, thus need a shell
script to do the redirects.

This adds a new shell script to just add a marker call add-marker.sh

Change-Id: I76cd140ad5ac1fb2163a11ab760134256b04f8dd
This commit is contained in:
Andreas Jaeger 2016-10-03 15:02:28 +02:00
parent 2f094127b3
commit 962283e8dd
2 changed files with 15 additions and 4 deletions

11
tools/add-marker.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
if [[ $# != 1 ]] ; then
echo "Pass directory to add marker to as single paramter"
exit 1
fi
# This marker is needed for infra publishing
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID"
echo $MARKER_TEXT > $1/.root-marker

View File

@ -9,6 +9,7 @@ setenv = VIRTUAL_ENV={envdir}
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals =
echo
mkdir
rm
rsync
@ -42,6 +43,7 @@ commands =
rsync -av doc/training-guides/build/slides/ publish-docs/training-guides/
[testenv:publishdocs]
passenv = ZUUL*
commands =
# Build upstream-training slides
sphinx-build -b slides -d doc/upstream-training/build/slides.doctrees/ doc/upstream-training/source/ doc/upstream-training/build/slides
@ -51,16 +53,14 @@ commands =
sphinx-build -b slides -d doc/training-guides/build/slides.doctrees/associate-guide doc/training-guides/associate-guide/ doc/training-guides/build/slides/associate-guide
# Build training-guides landing page
sphinx-build -b html -d doc/training-guides/build/slides.doctrees doc/training-guides doc/training-guides/build/slides doc/training-guides/index.rst
# This marker is needed for infra publishing
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID"
# Publish as draft
mkdir -p publish-docs/draft/training-guides
rsync -av doc/training-guides/build/slides/ publish-docs/draft/training-guides/
echo $MARKER_TEXT > publish-docs/draft/training-guides/.root-marker
{toxinidir}/tools/add-marker.sh publish-docs/draft/training-guides/
# Publish
mkdir -p publish-docs/upstream-training
rsync -av doc/upstream-training/build/slides/ publish-docs/upstream-training/
echo $MARKER_TEXT > publish-docs/upstream-training/.root-marker
{toxinidir}/tools/add-marker.sh publish-docs/upstream-training
# Publish translated guides
{toxinidir}/tools/buildlang.sh