system-config/modules/jenkins/files/slave_scripts/gerrit-doc-properties.sh
Monty Taylor e35a6e7c73 Aggregate jenkins modules into one module.
Put jenkins_master into jenkins::master and jenkins_job_builder into
jenkins::job_builder and jenkins_slave into jenkins::slave.

Change-Id: Icb0e3071894730c17d8f36f49e9d34979d9c568e
Reviewed-on: https://review.openstack.org/11249
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-12 18:22:26 +00:00

30 lines
863 B
Bash
Executable File

#!/bin/bash -e
# 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/diablo branch should get published to /diablo
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