diff options
author | varac <varacanero@zeromail.org> | 2016-10-15 23:03:49 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-10-18 21:17:13 +0200 |
commit | 03e7a5ddd745524a392ec4ad4c0773cfafbef1dd (patch) | |
tree | 6f45f34dee4f3d8e0ea8bd14c6972aea3b011e23 /tests/platform-ci | |
parent | 3728f820ca684798a5579fc445733ef531351bb7 (diff) |
Use random vm name when running local
when using gitlab-runner locally, CI_BUILD_ID is always 1 which
will conflict with running/terminating AWS instances in subsequent runs
therefore we pick a random number in this case
Diffstat (limited to 'tests/platform-ci')
-rwxr-xr-x | tests/platform-ci/ci-build.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh index 5872bf57..e67c2a76 100755 --- a/tests/platform-ci/ci-build.sh +++ b/tests/platform-ci/ci-build.sh @@ -23,22 +23,24 @@ set -e # leap_platform/tests/platform-ci -export ROOTDIR # shellcheck disable=SC2086 ROOTDIR=$(readlink -f "$(dirname $0)") # leap_platform/tests/platform-ci/provider -export PROVIDERDIR PROVIDERDIR="${ROOTDIR}/provider" # leap_platform -export PLATFORMDIR PLATFORMDIR=$(readlink -f "${ROOTDIR}/../..") LEAP_CMD="/usr/local/bin/bundle exec leap -v2 --yes" # create node(s) with unique id so we can run tests in parallel NAME="citest${CI_BUILD_ID}" +# when using gitlab-runner locally, CI_BUILD_ID is always 1 which +# will conflict with running/terminating AWS instances in subsequent runs +# therefore we pick a random number in this case +[ "$CI_BUILD_ID" -eq "1" ] && NAME+="000${RANDOM}" + TAG='single' SERVICES='couchdb,soledad,mx,webapp,tor,monitor' SEEDS='sources.platform.apt.basic:http://deb.leap.se/experimental-0.9 sources.webapp.revision:develop sources.nickserver.revision:master' |