diff options
author | Telyn <telyn@telynz.uk> | 2018-01-31 11:30:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-31 11:30:50 +0000 |
commit | 9ef70ed3d53e11dacc5d4df4478d5ff452a2dd6d (patch) | |
tree | ace44f0ea0a81d7d369df74c3d95c219905e7fa6 /.gitlab-ci.yml | |
parent | 0be1fa0ebadf9435a760582d17f47ff96dc0851c (diff) | |
parent | 9af0d1761552601db30de7a991d90d64ec6c88f5 (diff) |
Release to master
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..cf424a4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,68 @@ +stages: + - test + - package + - publish + +.test: &test + image: $CI_REGISTRY/docker-images/layers:$DISTRO-ruby + stage: test + script: + - apt install libsqlite3-dev zlib1g-dev libxml2-dev ruby-dev libpq-dev + - bundle install -j $(nproc) --path vendor/bundle --without development + - "POSTGRES_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB bundle exec rake test" + services: + - postgres:$POSTGRES_VERSION + before_script: + - apt install postgresql-server-dev-$POSTGRES_VERSION + +test:jessie: + <<: *test + variables: + DISTRO: jessie + POSTGRES_USER: root + POSTGRES_VERSION: "9.4" + +test:stretch: + <<: *test + variables: + DISTRO: stretch + POSTGRES_USER: root + POSTGRES_VERSION: "9.6" + +.package: &package + image: $CI_REGISTRY/docker-images/layers:$DISTRO-deb + stage: package + script: + - package + artifacts: + paths: + - pkg/ + +package:gem: + stage: package + image: $CI_REGISTRY/docker-images/layers:jessie-ruby + artifacts: + paths: + - pkg + script: + - package + variables: + GEMFILE: mauvesend.gemspec + +package:jessie: + <<: *package + variables: + DISTRO: jessie + +package:stretch: + <<: *package + variables: + DISTRO: stretch + +publish: + stage: publish + tags: + - shell + script: + - publish + |