aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2017-03-20 13:22:46 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2017-03-20 13:22:46 +0000
commit755c3dcbff838cbd833bbd94ddc5e8ad43ea5d06 (patch)
tree24c1ca1e7e040df71bf34d57de62bfab4647c405
parent0be1fa0ebadf9435a760582d17f47ff96dc0851c (diff)
Added CI
-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
+