X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffuel%2Ffuel-build.sh;h=c66dc3d8d83fe0b71627511f5cece0ffe22266a9;hb=refs%2Fchanges%2F89%2F28489%2F6;hp=42e373cbc722187beff675e1e55ff81a74eb77bc;hpb=28a9e274ffe85aac6d80cf00029e1d1a2f0a39f8;p=releng.git diff --git a/jjb/fuel/fuel-build.sh b/jjb/fuel/fuel-build.sh index 42e373cbc..c66dc3d8d 100755 --- a/jjb/fuel/fuel-build.sh +++ b/jjb/fuel/fuel-build.sh @@ -11,8 +11,13 @@ set -o errexit set -o nounset set -o pipefail +export TERM="vt220" + cd $WORKSPACE +# remove the expired items from cache +test -f $WORKSPACE/ci/clean_cache.sh && $WORKSPACE/ci/clean_cache.sh $CACHE_DIRECTORY + LATEST_ISO_PROPERTIES=$WORKSPACE/latest.iso.properties if [[ "$JOB_NAME" =~ "daily" ]]; then # check to see if we already have an artifact on artifacts.opnfv.org @@ -31,14 +36,19 @@ fi # get current SHA1 CURRENT_SHA1=$(git rev-parse HEAD) -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 +# 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 "***************************************************" + echo " An ISO has already been built for this commit" + echo " $LATEST_ISO_URL" + echo "***************************************************" +# 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 @@ -79,7 +89,7 @@ ls -al $BUILD_DIRECTORY echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" - echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)" + echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)" echo "OPNFV_BUILD_URL=$BUILD_URL" ) > $WORKSPACE/opnfv.properties