summaryrefslogtreecommitdiff
path: root/tests/platform-ci/ci-build.sh
diff options
context:
space:
mode:
authorVarac <varac@leap.se>2017-09-28 20:12:08 +0200
committerVarac <varac@leap.se>2017-09-28 21:06:03 +0200
commitd9d38bb283ff1c94cbf4bd488175cb77ae3fa3a4 (patch)
tree035b52e878a97b85887650dc5e952dbd718e4dcc /tests/platform-ci/ci-build.sh
parent1848c4c1f580ede26695a4731e280bc40d88f9a3 (diff)
CI: Test staging deb repo component
Resolves: #8871
Diffstat (limited to 'tests/platform-ci/ci-build.sh')
-rwxr-xr-xtests/platform-ci/ci-build.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh
index 120e2858..4710bc88 100755
--- a/tests/platform-ci/ci-build.sh
+++ b/tests/platform-ci/ci-build.sh
@@ -39,6 +39,9 @@ ROOTDIR=$(readlink -f "$(dirname $0)")
# leap_platform
PLATFORMDIR=$(readlink -f "${ROOTDIR}/../..")
+# deb repo component to configure
+COMPONENT=${COMPONENT:-"master"}
+
# In the gitlab CI pipeline leap is installed in a different
# stage by bundle. To debug you can run a single CI job locally
# so we install leap_cli as gem here.
@@ -88,7 +91,7 @@ build_from_scratch() {
# Create cloud.json needed for `leap vm` commands using AWS credentials
which jq || ( apt-get update -y && apt-get install jq -y )
- # Dsiable xtrace
+ # Disable xtrace
set +x
[ -z "$AWS_ACCESS_KEY" ] && fail "\$AWS_ACCESS_KEY is not set - please provide it as env variable."
@@ -102,7 +105,8 @@ build_from_scratch() {
[ -d "./tags" ] || mkdir "./tags"
/bin/echo "{\"environment\": \"$TAG\"}" | /usr/bin/json_pp > "${PROVIDERDIR}/tags/${TAG}.json"
- pwd
+ # configure deb repo component
+ echo '{}' | jq ".sources.platform.apt |= { \"source\": \"http://deb.leap.se/platform\", \"component\": \"${COMPONENT}\" }" > common.json
# remove old cached nodes
echo "Removing old cached nodes..."