K Jonathan Harker 8e7f9e3458 Move openstack-specific config out of ::jenkins
The ::jenkins::slave class contained a lot of openstack-specific
configuration rather than configuration of a generic jenkins slave.

The term "bare slave" is overloaded and confusing: create simple_slave
and thick_slave to differentiate between the two meanings of "bare".
Some portions of ::jenkins::slave will move to simple_slave, some
portions to thick_slave, and some portions to slave_common (all in the
openstack_project module).

Change-Id: I5281a03a7f6da3f98714bcc59ae840ace8435578
2014-05-20 14:39:51 -07:00

29 lines
969 B
Bash
Executable File

#!/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=$ZUUL_REFNAME
# The master branch should get published to /trunk
if [[ $BRANCH == "master" ]]; then
DOC_RELEASE_PATH="trunk"
DOC_COMMENTS_ENABLED=0
elif [[ $BRANCH =~ ^stable/(.*)$ ]]; then
# The stable/<releasename> branch should get published to /releasename, such as icehouse or havana
DOC_RELEASE_PATH=${BASH_REMATCH[1]}
DOC_COMMENTS_ENABLED=1
else
echo "Error: Branch($BRANCH) is invalid"
exit 1
fi
echo "DOC_RELEASE_PATH=$DOC_RELEASE_PATH" >gerrit-doc.properties
echo "DOC_COMMENTS_ENABLED=$DOC_COMMENTS_ENABLED" >>gerrit-doc.properties
pwd