Skip to content

Commit

Permalink
(SIMP-4009) Add support for OEL and Puppet5 (#26)
Browse files Browse the repository at this point in the history
* Added tests for Puppet 5
* Added support for OEL 6 and 7
  • Loading branch information
trevor-vaughan authored and lnemsick-simp committed Mar 15, 2018
1 parent 031fa83 commit 2f16d86
Show file tree
Hide file tree
Showing 13 changed files with 431 additions and 51 deletions.
228 changes: 228 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
# The testing matrix considers ruby/puppet versions supported by SIMP and PE:
#
# https://puppet.com/docs/pe/2017.3/overview/component_versions_in_recent_pe_releases.html
# https://puppet.com/misc/puppet-enterprise-lifecycle
# https://puppet.com/docs/pe/2017.3/overview/getting_support_for_pe.html#standard-releases-and-long-term-support-releases
# ------------------------------------------------------------------------------
# release pup ruby eol
# PE 2016.4 4.7 2.1.9 2018-10 (LTS)
# SIMP6.0.0 4.8 2.1.9 TBD
# PE 2017.2 4.10 2.1.9 2018-02-21
# PE 2017.3 5.3 2.4.1 2018-07
# PE 2018.1 ??? ????? ????-?? (LTS)
---
.cache_bundler: &cache_bundler
cache:
untracked: true
# An attempt at caching between runs (ala Travis CI)
key: "${CI_PROJECT_NAMESPACE}__bundler"
paths:
- '.vendor'
- 'vendor'

.setup_bundler_env: &setup_bundler_env
before_script:
- '(find .vendor | wc -l) || :'
- bundle check || gem install bundler --no-rdoc --no-ri
- rm -f Gemfile.lock
- rm -rf pkg/
- bundle install --no-binstubs --jobs $(nproc) --path=.vendor "${FLAGS[@]}"

.validation_checks: &validation_checks
script:
- bundle exec rake syntax
- bundle exec rake check:dot_underscore
- bundle exec rake check:test_file
- bundle exec rake pkg:check_version
- bundle exec rake pkg:compare_latest_tag
- bundle exec rake lint
- bundle exec rake clean
- bundle exec puppet module build

.spec_tests: &spec_tests
script:
- bundle exec rake spec

stages:
- validation
- unit
- acceptance
- deploy

# Puppet 4.7 for PE 2016.4 LTS Support (EOL: 2018-10-21)
# See: https://puppet.com/misc/puppet-enterprise-lifecycle
# --------------------------------------
pup4.7-validation:
stage: validation
tags:
- docker
image: ruby:2.1
variables:
PUPPET_VERSION: '~> 4.7.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *validation_checks

pup4.7-unit:
stage: unit
tags:
- docker
image: ruby:2.1
variables:
PUPPET_VERSION: '~> 4.7.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests


# Puppet 4.8 for SIMP 6.0 + 6.1 support
# --------------------------------------
pup4.8-validation:
stage: validation
tags:
- docker
image: ruby:2.1
variables:
PUPPET_VERSION: '~> 4.8.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *validation_checks

pup4.8-unit:
stage: unit
tags:
- docker
image: ruby:2.1
variables:
PUPPET_VERSION: '~> 4.8.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests


# Puppet 4.10 for PE 2017.2 support (EOL:2018-02-21)
# See: https://puppet.com/misc/puppet-enterprise-lifecycle
# --------------------------------------
pup4.10-validation:
stage: validation
tags:
- docker
image: ruby:2.1
variables:
PUPPET_VERSION: '~> 4.10.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *validation_checks

pup4.10-unit:
stage: unit
tags:
- docker
image: ruby:2.1
variables:
PUPPET_VERSION: '~> 4.10.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests


# Puppet 5.3 for PE 2017.3 support (EOL: 2018-07)
# See: https://puppet.com/misc/puppet-enterprise-lifecycle
# --------------------------------------
pup5.3-validation:
stage: validation
tags:
- docker
image: ruby:2.4
variables:
PUPPET_VERSION: '~> 5.3.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *validation_checks

pup5.3-unit:
stage: unit
tags:
- docker
image: ruby:2.4
variables:
PUPPET_VERSION: '~> 5.3.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests
allow_failure: true


# Keep an eye on the latest puppet 5
# ----------------------------------
pup5.latest-validation:
stage: validation
tags:
- docker
image: ruby:2.4
variables:
PUPPET_VERSION: '~> 5.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *validation_checks
allow_failure: true

pup5.latest-unit:
stage: unit
tags:
- docker
image: ruby:2.4
variables:
PUPPET_VERSION: '~> 5.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests
allow_failure: true



# Acceptance tests
# ==============================================================================
default-acceptance:
stage: acceptance
tags:
- beaker
<<: *cache_bundler
<<: *setup_bundler_env
variables:
PUPPET_VERSION: '4.10'
script:
- bundle exec rake beaker:suites[default]

fips-acceptance:
stage: acceptance
tags:
- beaker
<<: *cache_bundler
<<: *setup_bundler_env
variables:
PUPPET_VERSION: '4.10'
BEAKER_fips: 'yes'
script:
- bundle exec rake beaker:suites[default]
allow_failure: true

puppet5-acceptance:
stage: acceptance
tags:
- beaker
<<: *cache_bundler
<<: *setup_bundler_env
script:
- bundle exec rake beaker:suites[default,puppet5]
allow_failure: true

oel-acceptance:
stage: acceptance
tags:
- beaker
<<: *cache_bundler
<<: *setup_bundler_env
script:
- bundle exec rake beaker:suites[default,oel]
allow_failure: true
1 change: 0 additions & 1 deletion .puppet-lint.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
--relative
--no-class_inherits_from_params_class-check
--no-140chars-check
--no-empty_string-check
--no-trailing_comma-check
# This is here because the code can't handle lookups in parameters and we have
# a LOT of those
Expand Down
122 changes: 82 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,90 @@
# PE 2017.2 4.10 2.1.9 TBD
---
language: ruby
sudo: false
cache: bundler
before_script:
- bundle update
sudo: false

bundler_args: --without development system_tests --path .vendor
before_install: rm Gemfile.lock || true
script:
- bundle exec rake test

notifications:
email: false
rvm:
- 2.1.9
env:
global:
- STRICT_VARIABLES=yes
matrix:
- PUPPET_VERSION="~> 4.8.2" FORGE_PUBLISH=true
- PUPPET_VERSION="~> 4.10.0"
- PUPPET_VERSION="~> 4.9.2"
- PUPPET_VERSION="~> 4.7.0"
matrix:
fast_finish: true

before_deploy:
- 'bundle exec rake metadata_lint'
- 'bundle exec rake clobber'
- 'bundle exec rake spec_clean'
- "export PUPMOD_METADATA_VERSION=`ruby -r json -e \"puts JSON.parse(File.read('metadata.json')).fetch('version')\"`"
- '[[ $TRAVIS_TAG =~ ^simp-${PUPMOD_METADATA_VERSION}$|^${PUPMOD_METADATA_VERSION}$ ]]'
deploy:
- provider: puppetforge
user: simp
password:
secure: "A4iyZF2QK9mnFOljwe9/M/Z3hcwaIb2m6xX63CZDo+KlYRpD82ozE8W5xroYSFfiiJEARMYLJBqPBQmtp+tORqlneBPHATCxjEuEy2iOapPnVw+Wh2mWXWgCsjpog9OKjL/SHS3wcO1uQPRV3pR7Bf8duHc79kWYkSHgr6twGgjzG9T6xOWqt4W+Y4BZupeGDTD7MuR7RY9yt2i91IJjpdTjV5NAniOBeGKGtmFVtGus2Hye4LfuNdWcBzJucc9naT8lVobxTyc0qArCT9dVWRBU8cXfinR3E47bgbZ/75cqFN8ou+VxptehAkXQ5lSRG6OpHmZl7cdGHSnY/pDQMoZWYwd0qlnRm8zCVcVCPyXeTJXc6NNyLoSI1/e6toAzMf2qBuCG0AFRgkRPwXBZxmBMhcwzoy73O0sC5WnEb7Bwe8NUDcj76GUG6pv4fMF+PtuFIcA6JOknDGg1QyVMNA+Er2b8Uyklrrf4KrDMKUbD4NDcR/xMfxkt6lNSEQ7ut4LRy34YQA5xm1vChQpM5OtycNZxX7WQCpKvSWKl3II41XMxMO82E3AP3Ud4sGekWqB1Ln7XTnJ468tyFgQPrCMqBApW5KHNW4zDdQUABMnvtrAEtP0ldL7vMDbps+PqXzlYyD9jaU8PsUspR4+L6NfcBgyrmeOaHb8GTUfAGTs="
on:
tags: true

before_install:
- rm -f Gemfile.lock

jobs:
allow_failures:
- env: PUPPET_VERSION="~> 5.0"

include:

- stage: validate
rvm: 2.4.1
env: PUPPET_VERSION="~> 5"
script:
- bundle exec rake check:dot_underscore
- bundle exec rake check:test_file
- bundle exec rake pkg:check_version
- bundle exec rake syntax
- bundle exec rake lint
- bundle exec rake metadata_lint
- bundle exec rake pkg:compare_latest_tag
- bundle exec rake pkg:create_tag_changelog
- bundle exec puppet module build

- stage: validate
rvm: 2.1.9
condition: '($SKIP_FORGE_PUBLISH != true) && ($FORGE_PUBLISH = true)'
- provider: releases
api_key:
secure: "SRsr+CkP1RWMHeHGc53wtWzueRyj+NWB72iTpfaX2y5QJvM3vf3pMX8XJbxDEcVwwuuIRai3AhNGuCj1h0WT5WQqX/mg5Tsdwp0t1opOjUrI4EJDKpsS5DZUbC8moZO+XSddpnqXy9Xmp75pwBeCWEhs3lMGG+lx9SpYROKBXLHj5wI7KdI4rt1l93tstLMLp5V2iWVOTUsKIY3VAoi8kOVrJ9/gbcb4mSJcmPu5Kl3psx3sLBANvVuIMdy0UNdE4VKMWjXCTFunbbSv31+UJJCHJdvUxNAa5Cq5xlv2wJSbgWng9dqkgFvW1iH0qfbmI9HkyIQDoT5FXrhFSgU3dofN7+5dMhnOAjpfprDMgpjPD/ohjGIhvbUWmzaBWmvZrmYHIhIHC66Yz5joMBaJG8lBgoANyI+CoEbTVmxwnsnybxOfdY6z8b5amrHSlKBOLnvlVGxHWht7dCTxxgCze00WukSoWwnfHnEw+D8D87SQg5kn5m1TN5jxyRBz99jwfDmyNEnq6D37VBRJeJLli+sJWpKSahm1mJOaFJ7cGDyjCrv320/ms+NEkuesMtdWr9kwHiH7ODJ/pi7r1wzktABr8groKqsPRonA+HXC1Ji/A9uU+snufTSrtwKLpqEzG9iPVQ6IvWieLs42OUUwysUbgFUYrB/HlaecUX2odIc="
skip_cleanup: true
on:
tags: true
condition: '($SKIP_FORGE_PUBLISH != true) && ($FORGE_PUBLISH = true)'
env: PUPPET_VERSION="~> 4.8"
script:
- bundle exec rake syntax
- bundle exec rake lint
- bundle exec rake metadata_lint

- stage: spec
rvm: 2.4.1
env: PUPPET_VERSION="~> 5.0"
script:
- bundle exec rake spec

- stage: spec
rvm: 2.1.9
env: PUPPET_VERSION="~> 4.10.0"
script:
- bundle exec rake spec

- stage: spec
rvm: 2.1.9
env: PUPPET_VERSION="~> 4.9.2"
script:
- bundle exec rake spec

- stage: spec
rvm: 2.1.9
env: PUPPET_VERSION="~> 4.7.0"
script:
- bundle exec rake spec

- stage: deploy
rvm: 2.4.1
script:
- true
before_deploy:
- "export PUPMOD_METADATA_VERSION=`ruby -r json -e \"puts JSON.parse(File.read('metadata.json')).fetch('version')\"`"
- '[[ $TRAVIS_TAG =~ ^simp-${PUPMOD_METADATA_VERSION}$|^${PUPMOD_METADATA_VERSION}$ ]]'
deploy:
- provider: releases
api_key:
secure: "SRsr+CkP1RWMHeHGc53wtWzueRyj+NWB72iTpfaX2y5QJvM3vf3pMX8XJbxDEcVwwuuIRai3AhNGuCj1h0WT5WQqX/mg5Tsdwp0t1opOjUrI4EJDKpsS5DZUbC8moZO+XSddpnqXy9Xmp75pwBeCWEhs3lMGG+lx9SpYROKBXLHj5wI7KdI4rt1l93tstLMLp5V2iWVOTUsKIY3VAoi8kOVrJ9/gbcb4mSJcmPu5Kl3psx3sLBANvVuIMdy0UNdE4VKMWjXCTFunbbSv31+UJJCHJdvUxNAa5Cq5xlv2wJSbgWng9dqkgFvW1iH0qfbmI9HkyIQDoT5FXrhFSgU3dofN7+5dMhnOAjpfprDMgpjPD/ohjGIhvbUWmzaBWmvZrmYHIhIHC66Yz5joMBaJG8lBgoANyI+CoEbTVmxwnsnybxOfdY6z8b5amrHSlKBOLnvlVGxHWht7dCTxxgCze00WukSoWwnfHnEw+D8D87SQg5kn5m1TN5jxyRBz99jwfDmyNEnq6D37VBRJeJLli+sJWpKSahm1mJOaFJ7cGDyjCrv320/ms+NEkuesMtdWr9kwHiH7ODJ/pi7r1wzktABr8groKqsPRonA+HXC1Ji/A9uU+snufTSrtwKLpqEzG9iPVQ6IvWieLs42OUUwysUbgFUYrB/HlaecUX2odIc="
skip_cleanup: true
on:
tags: true
condition: '($SKIP_FORGE_PUBLISH != true)'
- provider: puppetforge
user: simp
password:
secure: "A4iyZF2QK9mnFOljwe9/M/Z3hcwaIb2m6xX63CZDo+KlYRpD82ozE8W5xroYSFfiiJEARMYLJBqPBQmtp+tORqlneBPHATCxjEuEy2iOapPnVw+Wh2mWXWgCsjpog9OKjL/SHS3wcO1uQPRV3pR7Bf8duHc79kWYkSHgr6twGgjzG9T6xOWqt4W+Y4BZupeGDTD7MuR7RY9yt2i91IJjpdTjV5NAniOBeGKGtmFVtGus2Hye4LfuNdWcBzJucc9naT8lVobxTyc0qArCT9dVWRBU8cXfinR3E47bgbZ/75cqFN8ou+VxptehAkXQ5lSRG6OpHmZl7cdGHSnY/pDQMoZWYwd0qlnRm8zCVcVCPyXeTJXc6NNyLoSI1/e6toAzMf2qBuCG0AFRgkRPwXBZxmBMhcwzoy73O0sC5WnEb7Bwe8NUDcj76GUG6pv4fMF+PtuFIcA6JOknDGg1QyVMNA+Er2b8Uyklrrf4KrDMKUbD4NDcR/xMfxkt6lNSEQ7ut4LRy34YQA5xm1vChQpM5OtycNZxX7WQCpKvSWKl3II41XMxMO82E3AP3Ud4sGekWqB1Ln7XTnJ468tyFgQPrCMqBApW5KHNW4zDdQUABMnvtrAEtP0ldL7vMDbps+PqXzlYyD9jaU8PsUspR4+L6NfcBgyrmeOaHb8GTUfAGTs="
on:
tags: true
rvm: 2.4.1
condition: '($SKIP_FORGE_PUBLISH != true)'

4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Thu Mar 08 2018 Trevor Vaughan <tvaughan@onyxpoint.com> - 0.4.5-0
- Add support for OracleLinux 6 and 7
- Test against Puppet 5

* Thu Aug 17 2017 Trevor Vaughan <tvaughan@onyxpoint.com> - 0.4.4-0
- Update the README with the new badges and improve formatting

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ group :test do
gem 'puppet-lint-empty_string-check', :require => false
gem 'puppet-lint-trailing_comma-check', :require => false
gem 'simp-rspec-puppet-facts', ENV.fetch('SIMP_RSPEC_PUPPET_FACTS_VERSION', '~> 2.0')
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', '~> 4.0')
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', ['>= 5.2', '< 6.0'])
end

group :development do
Expand Down
8 changes: 4 additions & 4 deletions build/rpm_metadata/requires
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Requires: pupmod-puppetlabs-stdlib < 5.0.0-0
Requires: pupmod-puppetlabs-stdlib >= 4.13.1-0
Requires: pupmod-simp-simplib < 4.0.0-0
Requires: pupmod-simp-simplib >= 3.2.0-0
Requires: pupmod-simp-simplib >= 3.2.0
Requires: pupmod-simp-simplib < 4.0.0
Requires: pupmod-puppetlabs-stdlib >= 4.13.1
Requires: pupmod-puppetlabs-stdlib < 5.0.0
Loading

0 comments on commit 2f16d86

Please sign in to comment.