summaryrefslogtreecommitdiff
path: root/tests/platform-ci
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2017-04-25 19:40:28 -0400
committerMicah Anderson <micah@riseup.net>2017-04-25 19:42:18 -0400
commit9d096ace3692f67fe82a97d648c930c2da19a830 (patch)
tree9150111dda9abffef5d29774eb956623042d7e4e /tests/platform-ci
parentada9645de11d75701db8202f34de5c26a2b749c2 (diff)
Add a production environment for demovpn, demomail
Pull duplicated bits into a function
Diffstat (limited to 'tests/platform-ci')
-rwxr-xr-xtests/platform-ci/ci-build.sh36
1 files changed, 24 insertions, 12 deletions
diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh
index b39f6874..e25b8096 100755
--- a/tests/platform-ci/ci-build.sh
+++ b/tests/platform-ci/ci-build.sh
@@ -70,6 +70,21 @@ build_from_scratch() {
LEAP_CMD info "${TAG}"
}
+run() {
+ echo "Cloning $1 repo: $2"
+ git clone -q --depth 1 "$2"
+ cd "$1"
+ git rev-parse HEAD
+ echo -n "Operating in the $1 directory: "
+ pwd
+ echo "Listing current node information..."
+ LEAP_CMD list
+ echo "Attempting a deploy..."
+ deploy
+ echo "Attempting to run tests..."
+ test
+}
+
#
# Main
#
@@ -89,18 +104,15 @@ set +x
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
+ run ibex ssh://gitolite@leap.se/ibex
+ ;;
+ production/mail)
+ TAG='demomail'
+ run bitmask ssh://gitolite@leap.se/bitmask
+ ;;
+ production/vpn)
+ TAG='demovpn'
+ run bitmask ssh://gitolite@leap.se/bitmask
;;
*)
# create node(s) with unique id so we can run tests in parallel