aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2017-07-31 17:29:42 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2017-07-31 17:29:42 +0100
commit94562f58ead1851353995ac1a1f0e7ac55110f1f (patch)
tree5869995fbb003fc7d03f9df7f60e23ae6b6d0e1f
parent134c6de531351a04b7a237e23c57c1fdab265374 (diff)
Updated gitlab-ci to use templates in the modern style
-rw-r--r--.gitlab-ci.yml38
1 files changed, 19 insertions, 19 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0bee31a..07b992b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,46 +3,48 @@ stages:
- package
- publish
-test:jessie: &test
+.test: &test
image: $CI_REGISTRY/docker-images/layers:$DISTRO-ruby
stage: test
- services:
- - postgres:9.4
- variables:
- POSTGRES_DB: mauve
- POSTGRES_USER: mauveuser
- POSTGRES_PASSWORD: ""
- DISTRO: jessie
- before_script:
- - apt install postgresql-server-dev-9.4
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
- allow_failure: true
variables:
DISTRO: stretch
POSTGRES_USER: root
- before_script:
- - apt install postgresql-server-dev-9.6
+ POSTGRES_VERSION: "9.6"
-package:jessie: &package
+.package: &package
image: $CI_REGISTRY/docker-images/layers:$DISTRO-deb
stage: package
- variables:
- DISTRO: jessie
script:
- package
artifacts:
paths:
- pkg/
+package:jessie:
+ <<: *package
+ variables:
+ DISTRO: jessie
+
package:stretch:
<<: *package
- allow_failure: true
variables:
DISTRO: stretch
@@ -52,6 +54,4 @@ publish:
- shell
script:
- publish
- dependencies:
- - package:jessie