summaryrefslogtreecommitdiff
path: root/buildscripts/build-platform.sh
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-06-30 22:14:35 +0200
committervarac <varacanero@zeromail.org>2016-06-30 22:14:35 +0200
commit68905faf4ae88dd87dc3373f7e8181ae999a9821 (patch)
treeaba08bd2fde427d99958a58716112e6e84d8dd6f /buildscripts/build-platform.sh
parentfa3416fa7b7a456925ae58fbff83b631a386edfa (diff)
renamed: build-on-greyhound.sh -> build-platform.sh
Diffstat (limited to 'buildscripts/build-platform.sh')
-rwxr-xr-xbuildscripts/build-platform.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/buildscripts/build-platform.sh b/buildscripts/build-platform.sh
new file mode 100755
index 0000000..66506bd
--- /dev/null
+++ b/buildscripts/build-platform.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+# triggers a CI test using leap local
+# usage: ./build_platform <branch>
+
+# make sure this script will exit with an exitcode>0
+# if any cmd fails
+exitcode=0
+trap "exitcode=1" ERR
+
+branch=$1
+ACCEPTED_BRANCHES='(master|develop|citest)'
+
+if [[ ! $branch =~ $ACCEPTED_BRANCHES ]]
+then
+ echo "CI builds only possible for these branches: $ACCEPTED_BRANCHES "
+ exit 1
+fi
+
+. /etc/leap/rewire_${branch}.cfg
+. /etc/leap/platform-test-common.cfg
+
+cd "$PROVIDERDIR"
+
+leap info
+/usr/local/bin/platform_test/leap-platform-test -v -c /etc/leap/rewire_${branch}.cfg reset_deploy --all
+/usr/local/bin/platform_test/leap-platform-test -v -c /etc/leap/rewire_${branch}.cfg test
+leap local stop
+
+exit $exitcode