X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Farmband%2Fbuild.sh;h=29c01bb38206cdd9933c3710e5d9f4c1ff3bea0e;hb=720399137357dc4eb2b1379e842c4e85c37f07a8;hp=26c46d2fc2bac6ac2f29ff0ebad8bb4791be93d6;hpb=6b86682f5ee6490b1cc44a3e612043146cc16dc8;p=releng.git diff --git a/jjb/armband/build.sh b/jjb/armband/build.sh index 26c46d2fc..29c01bb38 100755 --- a/jjb/armband/build.sh +++ b/jjb/armband/build.sh @@ -2,18 +2,34 @@ # SPDX-license-identifier: Apache-2.0 ############################################################################## # Copyright (c) 2016 Ericsson AB and others. -# Copyright (c) 2016 Enea AB. +# Copyright (c) 2017 Enea AB. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## + +# disable Armband iso build for master branch +if [[ "$BRANCH" == 'master' ]]; then + touch $WORKSPACE/.noupload + echo "--------------------------------------------------------" + echo "Done!" + exit 0 +fi + set -o errexit set -o nounset set -o pipefail +export TERM="vt220" + +echo "Host info: $(hostname) $(hostname -I)" + cd $WORKSPACE +# Armband requires initializing git submodules (e.g. for Fuel's clean_cache.sh) +make submodules-init + # remove the expired items from cache test -f $WORKSPACE/ci/clean_cache.sh && $WORKSPACE/ci/clean_cache.sh $CACHE_DIRECTORY @@ -24,8 +40,10 @@ if [[ "$JOB_NAME" =~ "daily" ]]; then echo "Checking to see if we already built and stored Armband Fuel ISO for this commit" curl -s -o $LATEST_ISO_PROPERTIES http://$GS_URL/latest.properties 2>/dev/null +fi - # get metadata of latest ISO +# get metadata of latest ISO +if grep -q OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES 2>/dev/null; then LATEST_ISO_SHA1=$(grep OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES | cut -d'=' -f2) LATEST_ISO_URL=$(grep OPNFV_ARTIFACT_URL $LATEST_ISO_PROPERTIES | cut -d'=' -f2) else @@ -87,6 +105,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_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)" echo "OPNFV_BUILD_URL=$BUILD_URL" ) > $WORKSPACE/opnfv.properties