2 ##############################################################################
3 # Copyright (c) 2016 Ericsson AB and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
16 CURRENT_SHA1=$(git rev-parse HEAD)
19 echo "Starting the build of Armband. This could take some time..."
20 echo "-----------------------------------------------------------"
23 # set OPNFV_ARTIFACT_VERSION
24 if [[ "$JOB_NAME" =~ "merge" ]]; then
25 echo "Building Fuel ISO for a merged change"
26 export OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER"
30 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
33 NOCACHE_PATTERN="verify: no-cache"
34 if [[ "$JOB_NAME" =~ "verify" && "$GERRIT_CHANGE_COMMIT_MESSAGE" =~ "$NOCACHE_PATTERN" ]]; then
35 echo "The cache will not be used for this build!"
38 NOCACHE_ARG=${NOCACHE_ARG:-}
42 ./build.sh $BUILD_DIRECTORY
44 # list the build artifacts
45 ls -al $BUILD_DIRECTORY
47 # save information regarding artifact into file
49 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
50 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
51 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
52 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
53 echo "OPNFV_BUILD_URL=$BUILD_URL"
54 ) > $WORKSPACE/opnfv.properties
57 echo "--------------------------------------------------------"