diff options
author | Tim Rozet <trozet@redhat.com> | 2017-06-01 15:51:30 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2017-06-01 15:51:30 -0400 |
commit | 3c9586d2ea6e32940e9fa311de495520d26c719d (patch) | |
tree | aaff131f3facb74eecafe878acf67c5850b61683 /jjb/apex | |
parent | 8efe44853121774b32960149e8c8323038235d5b (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')
-rw-r--r-- | jjb/apex/apex-snapshot-create.sh | 6 | ||||
-rwxr-xr-x | jjb/apex/apex-upload-artifact.sh | 5 | ||||
-rw-r--r-- | jjb/apex/apex.yml | 16 | ||||
-rw-r--r-- | jjb/apex/apex.yml.j2 | 16 |
4 files changed, 33 insertions, 10 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 "-------------------------" diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index 9d0b0148c..25870bb35 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -75,7 +75,10 @@ uploadrpm () { uploadsnap () { # Uploads snapshot artifact and updated properties file echo "Uploading snapshot artifacts" - 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 gsutil cp $WORKSPACE/apex-${SNAP_TYPE}-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log if [ "$SNAP_TYPE" == 'csit' ]; then gsutil cp $WORKSPACE/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index ab3df6e63..50502d77a 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -1181,7 +1181,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1191,7 +1193,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1269,7 +1273,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1279,7 +1285,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index b040ba5bf..84a899f57 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -820,7 +820,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -830,7 +832,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -908,7 +912,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -918,7 +924,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true |