Get daisy installer IP
[releng.git] / jjb / escalator / escalator-build.sh
1 #!/bin/bash
2 echo "--------------------------------------------------------"
3 echo "This is escalator build job!"
4 echo "--------------------------------------------------------"
5
6 # set OPNFV_ARTIFACT_VERSION
7 if [[ "$JOB_NAME" =~ "merge" ]]; then
8     echo "Building Escalator TAR for a merged change"
9     export OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER"
10 else
11     export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
12 fi
13
14 # build output directory
15 OUTPUT_DIR=$WORKSPACE/build_output
16 mkdir -p $OUTPUT_DIR
17
18 # start the build
19 cd $WORKSPACE
20 ./ci/build.sh $OUTPUT_DIR $OPNFV_ARTIFACT_VERSION
21
22 # save information regarding artifact into file
23 (
24     echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
25     echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
26     echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
27     echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin"
28     echo "OPNFV_BUILD_URL=$BUILD_URL"
29 ) > $WORKSPACE/opnfv.properties
30
31 echo
32 echo "--------------------------------------------------------"
33 echo "Done!"