system-config/modules/jenkins/files/slave_scripts/docbook-properties.sh
Jeremy Stanley 55123aa1d3 Debugging output for docbook properties script.
* .../jenkins/files/slave_scripts/docbook-properties.sh: Have the
shell echo commands run in this script, to aid in debugging. The
console log for jobs using this didn't previously provide sufficient
feedback to be able to see what values were set in the resulting
properties file.

Change-Id: I9909009d3f85e6c3c1e5dbc5465ef38adbd75df4
Reviewed-on: https://review.openstack.org/26849
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-04-12 22:41:40 +00:00

30 lines
901 B
Bash

#!/bin/bash -ex
# Documentation is published to a URL depending on the branch of the
# openstack-manuals project. This script determines what that location
# should be, and writes a properties file. This is used by Jenkins when
# invoking certain docs jobs and made available to maven.
# In case we start doing something more sophisticated with other refs
# later (such as tags).
BRANCH=$GERRIT_REFNAME
# The master branch should get published to /trunk
if [ $BRANCH == "master" ]
then
DOC_RELEASE_PATH="trunk"
DOC_COMMENTS_ENABLED=0
fi
# The stable/<releasename> branch should get published to /releasename, such as folsom or essex
if [[ $BRANCH =~ ^stable/(.*)$ ]]
then
DOC_RELEASE_PATH=${BASH_REMATCH[1]}
DOC_COMMENTS_ENABLED=1
fi
echo "DOC_RELEASE_PATH=$DOC_RELEASE_PATH" >gerrit-doc.properties
echo "DOC_COMMENTS_ENABLED=$DOC_COMMENTS_ENABLED" >>gerrit-doc.properties
pwd