53e9722b0b
Patch set 3 makes the jobname the filename and adds a second job for building the programming api mdown book. Patch set 4 corrects the job name to match the file name. Patch set 5 renames the .sh.save file and adds it to the job builders. Patch set 6 addresses final comments - appending to the gerrit-doc.properties file and removes tabs. Patch set 7 addresses comments. Would like to continue work on markdown to docbook and delay work on the properties script if possible. Patch set 8 removes docbook-properties as a prebuilder and removes DOC_OPERATING_SYSTEM as a variable. Rebase against master also. Updates macros.yaml and manuals.yaml to pass in filename for markdown files. Adds properties injection to the markdown to docbook jobs. Removes extraenous tab from modules/openstack_project/files/zuul/layout.yaml Additional fixes to pass in filename correctly and remove DOC_OPERATING_SYSTEM, fix filname typo. Removes file extension from markdown files, removes echo to gerrit-doc-properties from markdown-docbook script. Removes docbook-properties builder references as needed. Change-Id: I46c07cd11e96e8fc463a377519926a43981e4b3d Reviewed-on: https://review.openstack.org/12214 Reviewed-by: James E. Blair <corvus@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
30 lines
900 B
Bash
30 lines
900 B
Bash
#!/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/<releasename> branch should get published to /releasename, such as diablo 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
|