diff options
author | Tim Rozet <trozet@redhat.com> | 2018-06-21 20:15:16 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2018-06-21 20:15:16 -0400 |
commit | 3dd625926e04a3791acd006f83be17dc3fd8979e (patch) | |
tree | 77d305e713452ef23db3819dcfeca776da76a676 /jjb/apex/apex-snapshot-create.sh | |
parent | 4c34259866bd34d79fb5a100b8355404d9eca36a (diff) |
Apex: more snapshot fixes
Changes-Include:
- Rename jobs to have 'os' in them to distinguish openstack branch
- Fix uploading snapshots to upload from the create directory (where
the artifacts are built and stored)
- Fix the properties file so that it is created if one does not exist
already upstream in the artifacts repo
Change-Id: I0d75fd41585538cbe860274a082cb4051d8b05c5
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.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh index 7e38d56b4..b73931470 100644 --- a/jjb/apex/apex-snapshot-create.sh +++ b/jjb/apex/apex-snapshot-create.sh @@ -91,10 +91,16 @@ echo "Snapshot saved as apex-${SNAP_TYPE}-snap-${DATE}.tar.gz" # update opnfv properties file if [ "$SNAP_TYPE" == 'csit' ]; then - curl -O -L http://$GS_URL/snapshot.properties - sed -i '/^OPNFV_SNAP_URL=/{h;s#=.*#='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#};${x;/^$/{s##OPNFV_SNAP_URL='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#;H};x}' snapshot.properties snap_sha=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1) - sed -i '/^OPNFV_SNAP_SHA512SUM=/{h;s/=.*/='${snap_sha}'/};${x;/^$/{s//OPNFV_SNAP_SHA512SUM='${snap_sha}'/;H};x}' snapshot.properties + if curl --fail -O -L http://$GS_URL/snapshot.properties; then + sed -i '/^OPNFV_SNAP_URL=/{h;s#=.*#='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#};${x;/^$/{s##OPNFV_SNAP_URL='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#;H};x}' snapshot.properties + sed -i '/^OPNFV_SNAP_SHA512SUM=/{h;s/=.*/='${snap_sha}'/};${x;/^$/{s//OPNFV_SNAP_SHA512SUM='${snap_sha}'/;H};x}' snapshot.properties + else + cat << EOF > snapshot.properties +OPNFV_SNAP_URL=${GS_URL}/apex-csit-snap-${DATE}.tar.gz +OPNFV_SNAP_SHA512SUM=${snap_sha} +EOF + fi echo "OPNFV_SNAP_URL=$GS_URL/apex-csit-snap-${DATE}.tar.gz" echo "OPNFV_SNAP_SHA512SUM=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1)" echo "Updated properties file: " |