diff options
| -rw-r--r-- | .gitlab-ci.yml | 10 | ||||
| -rwxr-xr-x | tests/platform-ci/ci-build.sh | 36 | 
2 files changed, 34 insertions, 12 deletions
| diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5654238e..2cef28e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,3 +75,13 @@ latest:    - master    script:      - su -c '/usr/bin/unbuffer ./ci-build.sh' cirunner + +production: +  stage: deploy +  environment: +    name: production +  only: +    - master +  when: manual +  script: +    - su -c '/usr/bin/unbuffer ./ci-build.sh' cirunner 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 | 
