Skip to content

Commit

Permalink
Gitlab CI and Travis
Browse files Browse the repository at this point in the history
- Deleted some non-supported combinations of Puppet and Ruby from Travis Matrix
- Added some form of matrix for Gitlab CI
- Gitlab CI fixes for old Puppet versions
  • Loading branch information
bjvrielink committed Apr 10, 2019
1 parent 76cd666 commit a82735c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 16 deletions.
53 changes: 40 additions & 13 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,61 @@
image: "ruby:2.4.5"

---
cache:
paths:
- vendor/ruby
- spec/fixtures

variables:

.puppet400: &puppet400
PUPPET_LOCATION: 4.0.0
BUNDLER: '1.7.3'

.puppet41012: &puppet41012
PUPPET_LOCATION: 4.10.12
BUNDLER: '1.7.3'

before_script:
- gem install bundler --no-document
- bundle install -j $(nproc) --path vendor
.puppet550: &puppet550
PUPPET_LOCATION: 5.5.0
BUNDLER: '>= 0'

test-syntax:
stage: test
.syntax: &syntax
script:
- bundle exec rake syntax

test-validate:
stage: test
.validate: &validate
script:
- bundle exec rake validate

test-lint:
stage: test
.lint: &lint
script:
- bundle exec rake lint

test-rspec:
stage: test
.spec: &spec
script:
- bundle exec rake spec SPEC_OPTS='--format documentation'
coverage: '/Resource coverage: \d+\.\d+/'

before_script:
- gem install bundler --no-document --version "$BUNDLER"
- bundle install -j $(nproc) --path vendor --without development acceptance

puppet41012_test:
stage: test
image: "ruby:2.1.9"
<<: [*syntax, *validate, *lint, *spec]
variables:
<<: [*puppet41012]

puppet550_test:
image: "ruby:2.4.5"
stage: test
<<: [*syntax, *validate, *lint, *spec]
variables:
<<: [*puppet550]

puppet400_test:
stage: test
image: "ruby:2.1.9"
<<: [*syntax, *validate, *lint, *spec]
variables:
<<: [*puppet400]
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ env:
- PUPPET_LOCATION="~> 3.6.0"
- PUPPET_LOCATION="~> 3.7.0"
- PUPPET_LOCATION="~> 4.0.0"
- PUPPET_LOCATION="~> 5.5.0"
matrix:
include:
- rvm: 1.9.3
env: PUPPET_LOCATION="~> 3.2.0"
- rvm: 2.0.0
env: PUPPET_LOCATION="~> 3.3.0"
- rvm: 2.4.5
env: PUPPET_LOCATION="~> 5.5.0"

global:
- PUBLISHER_LOGIN=bjvrielink
Expand Down

0 comments on commit a82735c

Please sign in to comment.