Skip artifact upload if nothing new is built 93/4993/1
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 22 Dec 2015 00:43:40 +0000 (01:43 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 22 Dec 2015 00:43:40 +0000 (01:43 +0100)
Change-Id: I966229199d07c44073247ae25e9423fda516f73d
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/fuel/fuel-build.sh
jjb/fuel/fuel-upload-artifact.sh

index be188b8..6ccfb6f 100755 (executable)
@@ -23,6 +23,7 @@ if [[ "$CURRENT_SHA1" == "$LATEST_ISO_SHA1" ]]; then
     echo "An ISO has already been built for this commit"
     echo "    $LATEST_ISO_URL"
     echo "Nothing new to build. Exiting."
+    touch $WORKSPACE/.noupload
     exit 0
 else
     echo "This commit has not been built yet. Proceeding with the build."
index 5d3fed6..fc35023 100755 (executable)
@@ -3,6 +3,13 @@ set -o errexit
 set -o nounset
 set -o pipefail
 
+# check if we built something
+if [ -f $WORKSPSACE/.noupload ]; then
+    echo "Nothing new to upload. Exiting."
+    /bin/rm -f $WORKSPSACE/.noupload
+    exit 0
+fi
+
 # log info to console
 echo "Uploading the $INSTALLER_TYPE artifact. This could take some time..."
 echo "--------------------------------------------------------"