fuel: Enable force build 71/10371/4
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Mon, 22 Feb 2016 07:48:15 +0000 (08:48 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Mon, 22 Feb 2016 07:53:22 +0000 (08:53 +0100)
Change-Id: Ife5326ec3d64f2c2a3749461eb9687fa24fe15ac
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/fuel/fuel-build.sh
jjb/fuel/fuel-project-jobs.yml

index 42e373c..eaf1f83 100755 (executable)
@@ -31,14 +31,17 @@ fi
 # get current SHA1
 CURRENT_SHA1=$(git rev-parse HEAD)
 
-if [[ "$CURRENT_SHA1" == "$LATEST_ISO_SHA1" ]]; then
+# set FORCE_BUILD to false for non-daily builds
+FORCE_BUILD=${FORCE_BUILD:-false}
+
+if [[ "$CURRENT_SHA1" == "$LATEST_ISO_SHA1" && "$FORCE_BUILD" == "false" ]]; 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."
+    echo "This commit has not been built yet or forced build! Proceeding with the build."
     /bin/rm -f $LATEST_ISO_PROPERTIES
     echo
 fi
index e42aa90..d1855f8 100644 (file)
             project: '{project}'
         - 'ericsson-build-defaults'
         - '{installer}-defaults'
+        - choice:
+            name: FORCE_BUILD
+            choices:
+              - 'false'
+              - 'true'
+            description: "Force build even if there is no changes in fuel repo. Default false"
         - fuel-project-parameter:
             gs-pathname: '{gs-pathname}'