summaryrefslogtreecommitdiffstats
path: root/jjb/kvmfornfv
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-08-17 12:50:04 +0200
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-08-17 12:50:04 +0200
commit3b638b533d06b813e1555e80c80473b22909a123 (patch)
tree81eec0bb8ee97cde5937e5fdb02a46c315fa7c2b /jjb/kvmfornfv
parent4a416669bb2b63729223e84b9d0d8723c05c42ee (diff)
kvmfornfv: Attempt removing outdated artifacts only if the exist
Change-Id: I0a88dd8818cb11761bfd83fd37f41474ae698435 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb/kvmfornfv')
-rwxr-xr-xjjb/kvmfornfv/kvmfornfv-upload-artifact.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
index 48c013498..adf902ec9 100755
--- a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
+++ b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
@@ -1,7 +1,6 @@
#!/bin/bash
set -o errexit
set -o nounset
-set -o pipefail
if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then
JOB_TYPE=${BASH_REMATCH[0]}
@@ -15,7 +14,7 @@ case "$JOB_TYPE" in
echo "Uploading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..."
GS_UPLOAD_LOCATION="gs://artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER"
echo "Removing artifacts produced for the previous patch for the change $GERRIT_CHANGE_NUMBER"
- gsutil rm -r $GS_UPLOAD_LOCATION
+ gsutil ls $GS_UPLOAD_LOCATION > /dev/null 2>&1 && gsutil rm -r $GS_UPLOAD_LOCATION
;;
daily)
echo "Uploding daily artifacts This could take some time..."