From c0d89e5e37bf720fe0bb97eacb5ba7a715317491 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Tue, 19 Jun 2018 17:48:37 -0400 Subject: [PATCH] Add gitlab ci integration --- .gitignore | 2 ++ .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ Gemfile | 17 +++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Gemfile diff --git a/.gitignore b/.gitignore index 1db51fe..1bc8caf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ spec/fixtures +public/ +.yardoc/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e2510dd --- /dev/null +++ b/.gitlab-ci.yml @@ -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 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..027101e --- /dev/null +++ b/Gemfile @@ -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