Merge install and deploy guide scripts

The two scripts do the same, just have one different parameter. Use a
single script and rename it.

The scripts are included directly in yaml and do not life anymore in the
scripts directory so that changes to them will be directly and don't
need new images to be built.

Change-Id: Ia229b118daabb1f43da1507a37a4fd3724c2512a
This commit is contained in:
Andreas Jaeger 2016-11-29 08:33:06 +01:00
parent b46fd31100
commit 79a5be8415
4 changed files with 18 additions and 59 deletions

View File

@ -0,0 +1,3 @@
#!/bin/bash -xe
VENV="install-guide"
GUIDEDIR="install-guide"

View File

@ -1,9 +1,10 @@
#!/bin/bash -xe
# This script is used to publish project-specific deploy-guide
# documents to the proper place. Master will be published to a draft
# directory, stable/X will be published to the X directory. For
# example stable/newton documents will life in the newton directory.
# This script is used to publish project-specific deploy-guide and
# install-guide documents to the proper place. Master will be
# published to a draft directory, stable/X will be published to the X
# directory. For example stable/newton documents will life in the
# newton directory.
# You need to pass in the following variables:
# VENV - virtual env to use

View File

@ -81,7 +81,10 @@
- zuul-git-prep-upper-constraints
- install-distro-packages
- revoke-sudo
- shell: "/usr/local/jenkins/slave_scripts/run-install-guide.sh"
- shell:
!include-raw-escape:
- include/install-guide-pre.sh
- include/run-project-guide.sh
publishers:
- scp:
@ -105,7 +108,7 @@
- shell:
!include-raw-escape:
- include/deploy-guide-pre.sh
- include/run-deploy-guide.sh
- include/run-project-guide.sh
publishers:
- scp:
@ -126,7 +129,10 @@
- zuul-git-prep-upper-constraints
- install-distro-packages
- revoke-sudo
- shell: "/usr/local/jenkins/slave_scripts/run-install-guide.sh"
- shell:
!include-raw-escape:
- include/install-guide-pre.sh
- include/run-project-guide.sh
- add-docs-root-marker:
docsrootdir: install-guide/build/html/
@ -155,7 +161,7 @@
- shell:
!include-raw-escape:
- include/deploy-guide-pre.sh
- include/run-deploy-guide.sh
- include/run-project-guide.sh
- add-docs-root-marker:
docsrootdir: deploy-guide/build/html/

View File

@ -1,51 +0,0 @@
#!/bin/bash -xe
# This script is used to publish project-specific install-guide
# documents to the proper place. Master will be published to a draft
# directory, stable/X will be published to the X directory. For
# example stable/newton documents will life in the newton directory.
venv=install-guide
export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt
tox -e $venv
result=$?
[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip
echo "Begin pbr freeze output from test virtualenv:"
echo "======================================================================"
.tox/${venv}/bin/${freezecmd} freeze
echo "======================================================================"
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID Revision: $ZUUL_NEWREV"
echo $MARKER_TEXT > install-guide/build/html/.root-marker
if [ -z "$ZUUL_REFNAME" ]; then
TARGET=""
# Leave documents where they are
elif [ "$ZUUL_REFNAME" == "master" ] ; then
TARGET=draft
elif echo $ZUUL_REFNAME | grep stable/ >/dev/null ; then
# Put stable release changes in dir named after stable release under the
# build dir. When Jenkins copies these files they will be accessible under
# the developer docs root using the stable release's name.
TARGET=$(echo $ZUUL_REFNAME | sed 's/stable.//')
else
# Put other branch changes in dir named after branch under the
# build dir. When Jenkins copies these files they will be
# accessible under the developer docs root using the branch name.
# EG: feature/foo or milestone-proposed
TARGET=$ZUUL_REFNAME
fi
if [ ! -z $TARGET ] ; then
# Move the docs into subdir based on branch
TOP=`dirname $TARGET`
mv install-guide/build/html install-guide/build/tmp
mkdir -p install-guide/build/html/$TOP
mv install-guide/build/tmp install-guide/build/html/$TARGET
fi
exit $result