blob: 66506bdf63237c8818e35b0f5be7030d71be01c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|