diff options
author | Micah Anderson <micah@riseup.net> | 2017-11-28 11:35:01 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2017-11-28 11:35:01 -0500 |
commit | 0d251e2ceddd3e02ed8bba8725830689dbdd1397 (patch) | |
tree | 37d7096d9e458ca1e6431dff8a2f571553011c44 /.gitlab-ci.yml | |
parent | 93a181d44e2d8163ae44945aac1b6477e268170d (diff) | |
parent | bf6c56d86c7ba45e7ca766d990a9e9162025e5ac (diff) |
Merge tag 'refs/tags/0.10.0' into stable
Release 0.10.0
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 64 |
1 files changed, 51 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c315b2d2..a7a79d11 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ image: 0xacab.org:4567/leap/docker/ruby:latest # persistent on the gitlab-runner so we don't need to install from # scratch on every pipeline cache: - key: "$CI_BUILD_REF_NAME" + key: "global_platform_cache_between_pipelines" untracked: true paths: - tests/platform-ci/vendor/ @@ -51,22 +51,20 @@ catalog: script: - su -c '/usr/local/bin/bundle exec rake catalog' cirunner -# rspec: -# stage: rspec -# script: -# - /usr/local/bin/bundle exec rake spec - -# The deploy_test job is run on any merge request. This is used to ensure that -# the merge request will deploy and test properly. It is not run when the merge -# request is accepted into master, instead the 'latest' job below is run -# instead. -deploy_test: +deploy_test:master: stage: deploy except: - master script: - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner +deploy_test:staging: + stage: deploy + variables: + COMPONENT: "staging" + script: + - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner + # However, sometimes it's important to have a way of triggering a deploy # from scratch manually even from the master branch, when i.e. new packages # got uploaded to the master component of the platform deb repo. @@ -75,14 +73,54 @@ deploy_test:manual: only: - master when: manual + allow_failure: false script: - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner # Test upgrades from the latetest release to latest HEAD upgrade_test: stage: deploy - when: manual script: # Allow unpriviledged user to checkout last release of leap_platform - chown cirunner:cirunner -R ../.. - - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner || sleep 9000 + - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner + +# Latest job will only run on the master branch, which means all merge requests +# that are created from branches don't get to deploy to the latest-ci server. +# When a merge request is merged, then the latest job will deploy the code to +# the latest provider, and the deployment will be recorded in an environment +# named 'latest' +ci.leap.se: + stage: deploy + environment: + name: staging + only: + - master@leap/platform + script: + - > + su -c '/usr/bin/unbuffer /bin/bash -o pipefail ./ci-build.sh | + /usr/bin/ts' cirunner + +demo.bitmask.net: + stage: deploy + environment: + name: production/demo/vpn + only: + - master + when: manual + script: + - > + su -c '/usr/bin/unbuffer /bin/bash -o pipefail ./ci-build.sh | + /usr/bin/ts' cirunner + +mail.bitmask.net: + stage: deploy + environment: + name: production/demo/mail + only: + - master + when: manual + script: + - > + su -c '/usr/bin/unbuffer /bin/bash -o pipefail ./ci-build.sh | + /usr/bin/ts' cirunner |