merge GIT_BRANCH and GERRIT_BRANCH into BRANCH
[releng.git] / jjb / fuel / fuel-upload-artifact.sh
index 1ccd328..d1ac350 100755 (executable)
@@ -23,7 +23,7 @@ nfsstore () {
 # 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="/iso_mount/opnfv_ci/${GIT_BRANCH##*/}"
+    ISOSTORE="/iso_mount/opnfv_ci/${BRANCH##*/}"
     if [[ -d "$ISOSTORE" ]]; then
         # remove all but most recent 5 ISOs first to keep iso_mount clean & tidy
         cd $ISOSTORE
@@ -108,13 +108,11 @@ echo
 
 nfsstore
 
-if [[ ! "$JOB_NAME" =~ merge ]]; then
+if [[ "$JOB_NAME" =~ merge ]]; then
+    uploadiso
+elif [[ "$JOB_NAME" =~ build ]]; then
     importkey
     signiso
     uploadiso
 fi
 
-if [[ ! "$JOB_NAME" =~ verify ]]; then
-    uploadiso
-fi
-