Prevent double uploading while "build" jobs 91/23891/2
authorFedor Zhadaev <fzhadaev@mirantis.com>
Wed, 2 Nov 2016 12:17:05 +0000 (15:17 +0300)
committerFedor Zhadaev <fzhadaev@mirantis.com>
Wed, 2 Nov 2016 12:30:11 +0000 (15:30 +0300)
"build"-like jobs were matched to both if-statements so ISOs were uploaded
twice.

This patch fixes that behaviour.

JIRA: FUEL-221

Change-Id: I1f6b18339ec742b65de6a3f3c1ae3c9a5009fa4e
Signed-off-by: Fedor Zhadaev <fzhadaev@mirantis.com>
jjb/fuel/fuel-upload-artifact.sh

index 1ccd328..ca4ba00 100755 (executable)
@@ -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
-