aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml45
1 files changed, 45 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..001dc74
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,45 @@
+stages:
+ - test
+ - package
+ - publish
+
+test:jessie: &test
+ image: $CI_REGISTRY/docker-images/layers:$DISTRO-ruby
+ stage: test
+ variables:
+ DISTRO: jessie
+ script:
+ - bundle install -j $(nproc) --path vendor/bundle --binstubs
+ - bundle exec rake test:unit
+
+test:stretch:
+ <<: *test
+ variables:
+ DISTRO: stretch
+
+package:jessie: &package
+ image: $CI_REGISTRY/docker-images/layers:$DISTRO-deb
+ stage: package
+ variables:
+ DISTRO: jessie
+ script:
+ - package
+ artifacts:
+ paths:
+ - pkg/
+
+package:stretch:
+ <<: *package
+ variables:
+ DISTRO: stretch
+
+publish:
+ stage: publish
+ tags:
+ - shell
+ script:
+ - publish
+ dependencies:
+ - package:jessie
+ - package:stretch
+