summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-snapshot-create.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-06-01 15:51:30 -0400
committerTim Rozet <trozet@redhat.com>2017-06-01 15:51:30 -0400
commit3c9586d2ea6e32940e9fa311de495520d26c719d (patch)
treeaaff131f3facb74eecafe878acf67c5850b61683 /jjb/apex/apex-snapshot-create.sh
parent8efe44853121774b32960149e8c8323038235d5b (diff)
Apex: fixes snapshot promotion be variables
Since job names changed during the migration to multijob, we need to update the scripts which assume the the snapshot type is part of the job name. Moving them to be jjb variables instead and not rely on job name. Change-Id: I18f3bd5488c36b2f82a7bc7cb80045ab6807fa57 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/apex/apex-snapshot-create.sh')
-rw-r--r--jjb/apex/apex-snapshot-create.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh
index b2a39449e..342896c7d 100644
--- a/jjb/apex/apex-snapshot-create.sh
+++ b/jjb/apex/apex-snapshot-create.sh
@@ -13,7 +13,11 @@ set -o nounset
set -o pipefail
SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error)
-SNAP_TYPE=$(echo ${JOB_NAME} | sed -n 's/^apex-\(.\+\)-promote.*$/\1/p')
+
+if [ -z "$SNAP_TYPE" ]; then
+ echo "ERROR: SNAP_TYPE not provided...exiting"
+ exit 1
+fi
echo "Creating Apex snapshot..."
echo "-------------------------"