summaryrefslogtreecommitdiffstats
path: root/jjb/escalator/escalator-build.sh
diff options
context:
space:
mode:
authorzeyu zhu <zhu.zeyu@zte.com.cn>2016-11-24 14:34:40 +0800
committerzeyu zhu <zhu.zeyu@zte.com.cn>2016-11-24 16:00:28 +0800
commit1e349d61c7751b7bb2f7b1cc18d2af75ce68e41e (patch)
tree684855b4cef5fd47d1c33606374e2c08c530e1e8 /jjb/escalator/escalator-build.sh
parent900c31487a2160e8f4e07dc46d1ef8c9417f65bb (diff)
Add Escalator CI job
Change-Id: Ia2dafa452fb0512b04766fae92a97eff59db888b Signed-off-by: zeyu zhu <zhu.zeyu@zte.com.cn>
Diffstat (limited to 'jjb/escalator/escalator-build.sh')
-rwxr-xr-xjjb/escalator/escalator-build.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/jjb/escalator/escalator-build.sh b/jjb/escalator/escalator-build.sh
new file mode 100755
index 000000000..0e35c27d9
--- /dev/null
+++ b/jjb/escalator/escalator-build.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+echo "--------------------------------------------------------"
+echo "This is escalator build job!"
+echo "--------------------------------------------------------"
+
+# set OPNFV_ARTIFACT_VERSION
+if [[ "$JOB_NAME" =~ "merge" ]]; then
+ echo "Building Escalator TAR for a merged change"
+ export OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER"
+else
+ export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
+fi
+
+# build output directory
+OUTPUT_DIR=$WORKSPACE/build_output
+mkdir -p $OUTPUT_DIR
+
+# start the build
+cd $WORKSPACE
+./ci/build.sh $OUTPUT_DIR $OPNFV_ARTIFACT_VERSION
+
+# save information regarding artifact into file
+(
+ echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
+ 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.bin"
+ echo "OPNFV_BUILD_URL=$BUILD_URL"
+) > $WORKSPACE/opnfv.properties
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!"