From 1a33f14c662f4841d9e06370802c40ffbd6a141e Mon Sep 17 00:00:00 2001 From: Bob Vincent Date: Wed, 17 Jul 2019 10:14:20 -0400 Subject: [PATCH] Puppet 6 moves the "mount" resource into an external module. (#11) * Facter.value(:cmdline) is not always set. * Updated .travis.yml * Updated .gitlab-ci.yml * Updated .fixtures.yml for Puppet 6 pinning * Removed `mount_core` from metadata.json. This is a bug in Puppet in that they can't handle puppet version pinning in the metadata. Users will need to add the relevant modules by hand until Puppet 5 support is dropped. * Changed version bump since this module is not yet stable and removal of non-vendor supported Puppet versions is not a breaking module change. --- .fixtures.yml | 3 ++ .gitlab-ci.yml | 76 +++++++++++---------------------- .travis.yml | 32 +++++--------- CHANGELOG | 4 ++ lib/facter/ima_security_attr.rb | 2 +- metadata.json | 6 +-- 6 files changed, 46 insertions(+), 77 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index f1eede8..da858a4 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -3,6 +3,9 @@ fixtures: repositories: augeasproviders_core: https://github.com/simp/augeasproviders_core augeasproviders_grub: https://github.com/simp/augeasproviders_grub + mount_core: + repo: https://github.com/simp/pupmod-puppetlabs-mount_core.git + puppet_version: ">= 6.0.0" simplib: https://github.com/simp/pupmod-simp-simplib stdlib: https://github.com/simp/puppetlabs-stdlib symlinks: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93956eb..09249a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,14 +5,11 @@ # https://puppet.com/docs/pe/2018.1/overview/getting_support_for_pe.html # ------------------------------------------------------------------------------ # Release Puppet Ruby EOL -# SIMP 6.1 4.10.6 2.1.9 TBD -# SIMP 6.2 4.10.12 2.1.9 TBD -# SIMP 6.3 5.5.7 2.4.4 TBD*** -# PE 2018.1 5.5.8 2.4.4 2020-05 (LTS)*** +# SIMP 6.3 5.5.10 2.4.5 TBD*** +# PE 2018.1 5.5.8 2.4.5 2020-05 (LTS)*** # PE 2019.0 6.0 2.5.1 2019-08-31^^^ # # *** = Modules created for SIMP 6.3+ are not required to support Puppet < 5.5 -# ^^^ = SIMP doesn't support 6 yet; tests are info-only and allowed to fail --- stages: - 'sanity' @@ -65,18 +62,6 @@ variables: # Puppet Versions #----------------------------------------------------------------------- -.pup_4: &pup_4 - image: 'ruby:2.1' - variables: - PUPPET_VERSION: '~> 4.0' - MATRIX_RUBY_VERSION: '2.1' - -.pup_4_10: &pup_4_10 - image: 'ruby:2.1' - variables: - PUPPET_VERSION: '~> 4.10.4' - MATRIX_RUBY_VERSION: '2.1' - .pup_5: &pup_5 image: 'ruby:2.4' variables: @@ -84,22 +69,20 @@ variables: BEAKER_PUPPET_COLLECTION: 'puppet5' MATRIX_RUBY_VERSION: '2.4' -.pup_5_5_7: &pup_5_5_7 +.pup_5_5_10: &pup_5_5_10 image: 'ruby:2.4' variables: - PUPPET_VERSION: '5.5.7' + PUPPET_VERSION: '5.5.10' BEAKER_PUPPET_COLLECTION: 'puppet5' MATRIX_RUBY_VERSION: '2.4' .pup_6: &pup_6 - allow_failure: true image: 'ruby:2.5' variables: PUPPET_VERSION: '~> 6.0' BEAKER_PUPPET_COLLECTION: 'puppet6' MATRIX_RUBY_VERSION: '2.5' - # Testing Environments #----------------------------------------------------------------------- @@ -151,10 +134,6 @@ sanity_checks: # Linting #----------------------------------------------------------------------- -pup4-lint: - <<: *pup_4 - <<: *lint_tests - pup5-lint: <<: *pup_5 <<: *lint_tests @@ -170,54 +149,49 @@ pup5-unit: <<: *pup_5 <<: *unit_tests -pup5.5.7-unit: - <<: *pup_5_5_7 - <<: *unit_tests - -pup4.10-unit: - <<: *pup_4_10 +pup5.5.10-unit: + <<: *pup_5_5_10 <<: *unit_tests pup6-unit: <<: *pup_6 <<: *unit_tests -# Acceptance Tests -#----------------------------------------------------------------------- -pup4.10: - <<: *pup_4_10 +# Acceptance tests +# ============================================================================== +pup5.5.10: + <<: *pup_5_5_10 <<: *acceptance_base script: - 'bundle exec rake beaker:suites' -pup4.10-fips: - <<: *pup_4_10 +pup5.5.10-fips: + <<: *pup_5_5_10 <<: *acceptance_base - <<: *only_with_SIMP_FULL_MATRIX script: - 'BEAKER_fips=yes bundle exec rake beaker:suites' -pup5.5.7: - <<: *pup_5_5_7 +pup5.5.10-oel: + <<: *pup_5_5_10 <<: *acceptance_base script: - - 'bundle exec rake beaker:suites' + - 'bundle exec rake beaker:suites[default,oel]' -pup5.5.7-fips: - <<: *pup_5_5_7 +pup5.5.10-oel-fips: + <<: *pup_5_5_10 <<: *acceptance_base + <<: *only_with_SIMP_FULL_MATRIX script: - - 'BEAKER_fips=yes bundle exec rake beaker:suites' + - 'BEAKER_fips=yes bundle exec rake beaker:suites[default,oel]' -pup5.5.7-oel: - <<: *pup_5_5_7 +pup6: + <<: *pup_6 <<: *acceptance_base script: - - 'bundle exec rake beaker:suites[default,oel]' + - 'bundle exec rake beaker:suites' -pup5.5.7-oel-fips: - <<: *pup_5_5_7 +pup6-fips: + <<: *pup_6 <<: *acceptance_base - <<: *only_with_SIMP_FULL_MATRIX script: - - 'BEAKER_fips=yes bundle exec rake beaker:suites[default,oel]' + - 'BEAKER_fips=yes bundle exec rake beaker:suites' diff --git a/.travis.yml b/.travis.yml index db4c6ed..6f48a1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,15 +5,12 @@ # https://puppet.com/docs/pe/2018.1/overview/getting_support_for_pe.html # ------------------------------------------------------------------------------ # Release Puppet Ruby EOL -# SIMP 6.2 4.10 2.1.9 TBD -# PE 2016.4 4.10 2.1.9 2018-12-31 (LTS) -# PE 2017.3 5.3 2.4.4 2018-12-31 -# SIMP 6.3 5.5 2.4.4 TBD*** -# PE 2018.1 5.5 2.4.4 2020-05 (LTS)*** +# PE 2017.3 5.3 2.4.5 2018-12-31 +# SIMP 6.3 5.5 2.4.5 TBD*** +# PE 2018.1 5.5 2.4.5 2020-05 (LTS)*** # PE 2019.0 6.0 2.5.1 2019-08-31^^^ # # *** = Modules created for SIMP 6.3+ are not required to support Puppet < 5.5 -# ^^^ = SIMP doesn't support 6 yet; tests are info-only and allowed to fail --- language: ruby @@ -38,18 +35,16 @@ addons: before_install: - rm -f Gemfile.lock + - gem install -v '~> 1.17' bundler global: - STRICT_VARIABLES=yes jobs: - allow_failures: - - name: 'Latest Puppet 6.x (allowed to fail)' - include: - stage: check name: 'Syntax, style, and validation checks' - rvm: 2.4.4 + rvm: 2.4.5 env: PUPPET_VERSION="~> 5" script: - bundle exec rake check:dot_underscore @@ -61,22 +56,15 @@ jobs: - bundle exec rake lint - bundle exec puppet module build - - stage: spec - name: 'Puppet 4.10 (SIMP 6.2, PE 2016.4)' - rvm: 2.1.9 - env: PUPPET_VERSION="~> 4.10.0" - script: - - bundle exec rake spec - - stage: spec name: 'Puppet 5.3 (PE 2017.3)' - rvm: 2.4.4 + rvm: 2.4.5 env: PUPPET_VERSION="~> 5.3.0" script: - bundle exec rake spec - stage: spec - rvm: 2.4.4 + rvm: 2.4.5 name: 'Puppet 5.5 (SIMP 6.3, PE 2018.1)' env: PUPPET_VERSION="~> 5.5.0" script: @@ -84,20 +72,20 @@ jobs: - stage: spec name: 'Latest Puppet 5.x' - rvm: 2.4.4 + rvm: 2.4.5 env: PUPPET_VERSION="~> 5.0" script: - bundle exec rake spec - stage: spec - name: 'Latest Puppet 6.x (allowed to fail)' + name: 'Latest Puppet 6.x' rvm: 2.5.1 env: PUPPET_VERSION="~> 6.0" script: - bundle exec rake spec - stage: deploy - rvm: 2.4.4 + rvm: 2.4.5 script: - true before_deploy: diff --git a/CHANGELOG b/CHANGELOG index 986b5f4..eb779be 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +* Tue Jul 16 2019 Robert Vincent - 0.2.0-0 +- Provide Puppet-6 compatibility. +- Facter.value(:cmdline) is not always set. + * Thu Mar 07 2019 Liz Nemsick - 0.1.1-0 - Update the upper bound of stdlib to < 6.0.0 - Update a URL in the README.md diff --git a/lib/facter/ima_security_attr.rb b/lib/facter/ima_security_attr.rb index aacabec..a21c001 100644 --- a/lib/facter/ima_security_attr.rb +++ b/lib/facter/ima_security_attr.rb @@ -12,7 +12,7 @@ # Facter.add('ima_security_attr') do confine do - Facter.value(:cmdline).has_key?('ima_appraise_tcb') + Facter.value(:cmdline) && Facter.value(:cmdline).has_key?('ima_appraise_tcb') end setcode do diff --git a/metadata.json b/metadata.json index cccb560..5186139 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "simp-ima", - "version": "0.1.1", + "version": "0.2.0", "author": "SIMP Team", "summary": "Manages IMA", "license": "Apache-2.0", @@ -22,7 +22,7 @@ }, { "name": "puppetlabs/stdlib", - "version_requirement": ">= 4.13.1 < 6.0.0" + "version_requirement": ">= 4.13.1 < 7.0.0" } ], "operatingsystem_support": [ @@ -44,7 +44,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 4.7.0 < 6.0.0" + "version_requirement": ">= 5.0.0 < 7.0.0" } ] }