Add gitlab ci integration

This commit is contained in:
Kienan Stewart 2018-06-19 17:48:37 -04:00
parent 467080d8f1
commit c0d89e5e37
3 changed files with 49 additions and 0 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
spec/fixtures spec/fixtures
public/
.yardoc/

30
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,30 @@
image: ruby:2.3
# Test job template
.test_template: &test_definition
stage: test
script:
- bundle install --jobs $(nproc) --without docs --path vendor
- bundle exec rake test
# Test with version present on Debian stable
test:puppet48:
variables:
PUPPET_VERSION: '~> 4.8.2'
FACTER_VERSION: '~> 2.4.6'
HIERA_VERSION: '~> 3.2.0'
<<: *test_definition
# Test with latest Puppet release
test:puppetlatest:
<<: *test_definition
# Build and deploy docs on GitLab Pages
pages:
stage: deploy
script:
- bundle install --without tests --path vendor
- bundle exec rake docs
artifacts:
paths:
- public

17
Gemfile Normal file
View File

@ -0,0 +1,17 @@
source 'https://rubygems.org'
gem 'puppet', ENV['PUPPET_VERSION']
gem 'rake'
group :test do
gem 'facter', ENV['FACTER_VERSION']
gem 'hiera', ENV['HIERA_VERSION']
gem 'metadata-json-lint'
gem 'puppetlabs_spec_helper'
gem 'rspec-puppet-facts'
gem 'semantic_puppet'
end
group :docs do
gem 'puppet-strings'
end