Fix unused var crash for CI when not run from Gerrit

The recent CI short circuit patch runs into an issue
when run in promotion pipelines because the gerrit vars
may not be set.

Change-Id: If9b5c7abb78130c9f8fc02fc9bee158840a21efe
This commit is contained in:
jkilpatr 2017-10-04 14:24:48 -04:00
parent d00d2c41de
commit f0d3e43798
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -eu
if [[ $GERRIT_CHANGE_SUBJECT == "WIP "* ]] || [[ $GERRIT_CHANGE_SUBJECT == "wip "* ]]; then
echo "Commit is a work in progress, short circuiting"
@ -11,6 +10,7 @@ if [[ $GERRIT_CHANGE_SUBJECT == "WIP: "* ]] || [[ $GERRIT_CHANGE_SUBJECT == "wip
exit 1
fi
set -eu
pushd $WORKSPACE/tripleo-quickstart
sed -i.bak '/extras/d' $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt
echo "file://$WORKSPACE/tripleo-quickstart-extras/#egg=tripleo-quickstart-extras" >> $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt