From 03e7a5ddd745524a392ec4ad4c0773cfafbef1dd Mon Sep 17 00:00:00 2001 From: varac Date: Sat, 15 Oct 2016 23:03:49 +0200 Subject: 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 --- tests/platform-ci/ci-build.sh | 8 +++++--- 1 file 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' -- cgit v1.2.3