remove python 2.7 test in Yardstick CI gating
[releng.git] / jjb / daisy4nfv / daisy4nfv-build.sh
1 #!/bin/bash
2
3 set -o errexit
4 set -o nounset
5 set -o pipefail
6
7 echo "--------------------------------------------------------"
8 echo "This is diasy4nfv build job!"
9 echo "--------------------------------------------------------"
10
11 # set OPNFV_ARTIFACT_VERSION
12 if [[ "$JOB_NAME" =~ "merge" ]]; then
13     echo "Building Daisy4nfv ISO for a merged change"
14     export OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER"
15 else
16     export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
17 fi
18
19 # build output directory
20 OUTPUT_DIR=$WORKSPACE/build_output
21 mkdir -p $OUTPUT_DIR
22
23 # start the build
24 cd $WORKSPACE
25 ./ci/build.sh $OUTPUT_DIR $OPNFV_ARTIFACT_VERSION
26
27 # save information regarding artifact into file
28 (
29     echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
30     echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
31     echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
32     echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin"
33     echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $OUTPUT_DIR/opnfv-$OPNFV_ARTIFACT_VERSION.bin | cut -d' ' -f1)"
34     echo "OPNFV_ARTIFACT_URL_ISO=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
35     echo "OPNFV_ARTIFACT_SHA512SUM_ISO=$(sha512sum $OUTPUT_DIR/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
36     echo "OPNFV_BUILD_URL=$BUILD_URL"
37 ) > $WORKSPACE/opnfv.properties
38
39 echo
40 echo "--------------------------------------------------------"
41 echo "Done!"