stages: - test - package - publish test:jessie: &test image: $CI_REGISTRY/docker-images/layers:$DISTRO-ruby stage: test variables: DISTRO: jessie script: - apt-get install libxml2-dev libxslt1-dev - 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