X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Farmband%2Fupload-artifacts.sh;h=97987e2c5cd329bb0bdeb89fb5a641469ba7aa62;hb=ba53f5c4a3004b05281079dfe75ff3ab8719c237;hp=f4e84e9d21fedc392be5ff58817bfd4bd0cbb3c3;hpb=9bd71f3a00944616299fa2168105b57d74e549ea;p=releng.git diff --git a/jjb/armband/upload-artifacts.sh b/jjb/armband/upload-artifacts.sh index f4e84e9d2..97987e2c5 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}/${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 --