summaryrefslogtreecommitdiff
path: root/tests/platform-ci/ci-build.sh
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2017-04-20 14:59:51 -0400
committerMicah Anderson <micah@riseup.net>2017-04-20 14:59:51 -0400
commit9ab23ac448d629a362bdba142b685217b2103f07 (patch)
treed1dce8212b84e05b36592ed2bc9868baba8e22fd /tests/platform-ci/ci-build.sh
parent92f069fc456260c0cc394ab280e61a560ccb3345 (diff)
switch to using CI_ENVIRONMENT_NAME and defaulting to the basic deployment
Diffstat (limited to 'tests/platform-ci/ci-build.sh')
-rwxr-xr-xtests/platform-ci/ci-build.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh
index 869e7517..a9731fca 100755
--- a/tests/platform-ci/ci-build.sh
+++ b/tests/platform-ci/ci-build.sh
@@ -81,8 +81,23 @@ set +x
/bin/chmod 600 ~/.ssh/id_rsa
/bin/cp "${ROOTDIR}/provider/users/gitlab-runner/gitlab-runner_ssh.pub" ~/.ssh/id_rsa.pub
-case "$CI_BUILD_STAGE" in
- build)
+case "$CI_ENVIRONMENT_NAME" in
+ latest)
+ TAG='latest'
+ echo "Cloning ibex provider..."
+ git clone -q --depth 1 ssh://gitolite@leap.se/ibex
+ cd ibex
+ git rev-parse HEAD
+ echo -n "Operating in the ibex directory: "
+ pwd
+ echo "Listing current node information..."
+ LEAP_CMD list
+ echo "Attempting a deploy..."
+ deploy
+ echo "Attempting to run tests..."
+ test
+ ;;
+ *)
# 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
@@ -101,19 +116,4 @@ case "$CI_BUILD_STAGE" in
LEAP_CMD vm rm "${TAG}"
[ -f "nodes/${NAME}.json" ] && /bin/rm "nodes/${NAME}.json"
;;
- latest)
- TAG='latest'
- echo "Cloning ibex provider..."
- git clone -q --depth 1 ssh://gitolite@leap.se/ibex
- cd ibex
- git rev-parse HEAD
- echo -n "Operating in the ibex directory: "
- pwd
- echo "Listing current node information..."
- LEAP_CMD list
- echo "Attempting a deploy..."
- deploy
- echo "Attempting to run tests..."
- test
- ;;
esac