summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarac <varac@leap.se>2017-06-29 20:05:17 +0200
committerVarac <varac@leap.se>2017-07-01 19:37:50 +0200
commit0d304e582d643893f5e139eb5126c793bc82ae6d (patch)
treec76792f045719caec1c46bf31f71b8d30957945e
parentc232b863172a4f5b511e64f02882e5a4804c337e (diff)
[CI] Fix node name for local tests
-rwxr-xr-xtests/platform-ci/ci-build.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh
index 88856511..9332c12c 100755
--- a/tests/platform-ci/ci-build.sh
+++ b/tests/platform-ci/ci-build.sh
@@ -68,12 +68,14 @@ test() {
}
build_from_scratch() {
- # create node(s) with unique id so we can run tests in parallel
- NAME="citest${CI_BUILD_ID:-0}"
- # when using gitlab-runner locally, CI_BUILD_ID is always 1 which
+ # when using gitlab-runner locally, CI_JOB_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:-0}" -eq "1" ] && NAME+="000${RANDOM}"
+ [ "${CI_JOB_ID}" == "1" ] && CI_JOB_ID="000${RANDOM}"
+
+ # create node(s) with unique id so we can run tests in parallel
+ NAME="citest${CI_JOB_ID:-0}"
+
TAG='single'
SERVICES='couchdb,soledad,mx,webapp,tor,monitor'