aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-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