X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Farmband%2Fupload-artifacts.sh;h=7059ac34460e43a59f4286a62790cdad63dd3076;hb=8ea5b3a2e506ef3bbae983c0b2d5b13b3a22e768;hp=f4e84e9d21fedc392be5ff58817bfd4bd0cbb3c3;hpb=be56f9bb69c476c3235e6fca2f4cec6e230ae8f1;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 --