X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Farmband%2Fupload-artifacts.sh;h=7059ac34460e43a59f4286a62790cdad63dd3076;hb=956b45c6cda30baea8f8e41b33e8b49a684f12bd;hp=f4e84e9d21fedc392be5ff58817bfd4bd0cbb3c3;hpb=cac634f7fb9cf6ecbb4169589021ecb3c2492976;p=releng.git diff --git a/jjb/armband/upload-artifacts.sh b/jjb/armband/upload-artifacts.sh index f4e84e9d2..7059ac344 100755 --- a/jjb/armband/upload-artifacts.sh +++ b/jjb/armband/upload-artifacts.sh @@ -9,6 +9,9 @@ ############################################################################## set -o pipefail +# configurable environment variables: +# ISOSTORE (/iso_mount/opnfv_ci) + # check if we built something if [ -f $WORKSPACE/.noupload ]; then echo "Nothing new to upload. Exiting." @@ -19,11 +22,15 @@ fi # source the opnfv.properties to get ARTIFACT_VERSION source $WORKSPACE/opnfv.properties + # storing ISOs for verify & merge jobs will be done once we get the disk array if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then # store ISO locally on NFS first - ISOSTORE="/home/jenkins/opnfv/iso_store" + ISOSTORE=${ISOSTORE:-/iso_mount/opnfv_ci} if [[ -d "$ISOSTORE" ]]; then + ISOSTORE=${ISOSTORE}/${GIT_BRANCH##*/} + mkdir -p $ISOSTORE + # remove all but most recent 3 ISOs first to keep iso_mount clean & tidy cd $ISOSTORE ls -tp | grep -v '/' | tail -n +4 | xargs -d '\n' /bin/rm -f --