]> gitweb.fluxo.info Git - puppet-mailalias_core.git/commitdiff
(PA-6178) Update to PDK template 3.0.1 and use updated module release worfklow
authorAria Li <aria.li@puppet.com>
Wed, 20 Mar 2024 17:19:00 +0000 (10:19 -0700)
committerAria Li <aria.li@puppet.com>
Wed, 20 Mar 2024 21:34:33 +0000 (14:34 -0700)
This commit updates this module from PDK template 2.7.1 to 3.0.1 and updates
the module release workflows to use the newer release_prep instead of
auto_release GitHub Action wofklow. This commit also:
- Removes the github_changelog_generator and concurrent-ruby gems because they
  are no longer needed for the new module release process in PDK template
- Updates the Rakefile to use Vox Rake tasks only if the vospupuli-acceptance
  gem is installed

12 files changed:
.github/workflows/auto_release.yml [deleted file]
.github/workflows/release.yml
.github/workflows/release_prep.yml [new file with mode: 0644]
.gitignore
.pdkignore
.rubocop.yml
.sync.yml
Gemfile
Rakefile
metadata.json
spec/default_facts.yml
spec/spec_helper.rb

diff --git a/.github/workflows/auto_release.yml b/.github/workflows/auto_release.yml
deleted file mode 100644 (file)
index 3799f04..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-name: "Auto release"
-
-on:
-  workflow_dispatch:
-
-env:
-  HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6 
-  HONEYCOMB_DATASET: litmus tests
-  CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-jobs:
-  auto_release:
-    name: "Automatic release prep"
-    runs-on: ubuntu-20.04
-
-    steps:
-    
-    - name: "Honeycomb: Start recording"
-      uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
-      with:
-        apikey: ${{ env.HONEYCOMB_WRITEKEY }}
-        dataset: ${{ env.HONEYCOMB_DATASET }}
-        job-status: ${{ job.status }}
-
-    - name: "Honeycomb: start first step"
-      run: |
-        echo STEP_ID="auto-release" >> $GITHUB_ENV
-        echo STEP_START=$(date +%s) >> $GITHUB_ENV
-    - name: "Checkout Source"
-      if: ${{ github.repository_owner == 'puppetlabs' }}
-      uses: actions/checkout@v3
-      with:
-        fetch-depth: 0
-        persist-credentials: false
-
-    # We use the dev tools image here because the PDK image does not have the
-    # build tools necessary to compile native extensions.
-    - name: "PDK Release prep"
-      uses: docker://puppet/puppet-dev-tools:4.x
-      with:
-        args: 'pdk release prep --force --debug'
-      env:
-        CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-    - name: "Get Version"
-      if: ${{ github.repository_owner == 'puppetlabs' }}
-      id: gv
-      run: |
-        echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
-
-    - name: "Check if a release is necessary"
-      if: ${{ github.repository_owner == 'puppetlabs' }}
-      id: check
-      run: |
-        git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
-
-    - name: "Commit changes"
-      if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
-      run: |
-        git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
-        git config --local user.name "GitHub Action"
-        git add .
-        git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
-
-    - name: Create Pull Request
-      id: cpr
-      uses: puppetlabs/peter-evans-create-pull-request@v3
-      if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
-      with:
-        token: ${{ secrets.GITHUB_TOKEN }}
-        commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
-        branch: "release-prep"
-        delete-branch: true
-        title: "Release prep v${{ steps.gv.outputs.ver }}"
-        body: |
-          Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb) from commit ${{ github.sha }}. 
-          Please verify before merging:
-          - [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green
-          - [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests
-          - [ ] Ensure the [changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) version and [metadata](https://github.com/${{ github.repository }}/blob/release-prep/metadata.json) version match
-        labels: "maintenance"
-
-    - name: PR outputs
-      if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
-      run: |
-        echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
-        echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
-    - name: "Honeycomb: Record finish step"
-      if: ${{ always() }}
-      run: |
-        buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow'
index d9604ad6a1789f18711dd9f8ca8a0cfa1285e4ce..0b7b8a05dd11dcf98a85c476894a847d103f7f7c 100644 (file)
@@ -4,44 +4,6 @@ on:
   workflow_dispatch:
   
 jobs:
-  create-github-release:
-    name: Deploy GitHub Release
-    runs-on: ubuntu-20.04
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v3
-        with:
-          ref: ${{ github.ref }}
-          clean: true
-          fetch-depth: 0
-      - name: Get Version
-        id: gv
-        run: |
-          echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
-      - name: Create Release
-        uses: actions/create-release@v1
-        id: create_release
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        with:
-          tag_name: "v${{ steps.gv.outputs.ver }}"
-          draft: false
-          prerelease: false
-
-  deploy-forge:
-    name: Deploy to Forge
-    runs-on: ubuntu-20.04
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v3
-        with:
-          ref: ${{ github.ref }}
-          clean: true
-      - name: "PDK Build"
-        uses: docker://puppet/pdk:nightly
-        with:
-          args: 'build'
-      - name: "Push to Forge"
-        uses: docker://puppet/pdk:nightly
-        with:
-          args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'
+  release: 
+    uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main"
+    secrets: "inherit"
diff --git a/.github/workflows/release_prep.yml b/.github/workflows/release_prep.yml
new file mode 100644 (file)
index 0000000..bb0b7ac
--- /dev/null
@@ -0,0 +1,15 @@
+name: "Release Prep"
+
+on:
+  workflow_dispatch:
+    inputs:
+      version:
+        description: "Module version to be released. Must be a valid semver string. (1.2.3)"
+        required: true
+
+jobs:
+  release_prep:
+    uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main"
+    with:
+      version: "${{ github.event.inputs.version }}"
+    secrets: "inherit"
index 988dcbbe627164747384a785867e442b781e9001..3f1551212b9014d58838c04b35c4f2b2455fdd9d 100644 (file)
@@ -16,7 +16,7 @@
 /log/
 /pkg/
 /spec/fixtures/manifests/
-/spec/fixtures/modules/
+/spec/fixtures/modules/*
 /tmp/
 /vendor/
 /convert_report.txt
index a956c8fe6d8e9e1da6b3540a2da225cd059652c8..862847a72cba4311bc27e97b35fc93238c84fbdd 100644 (file)
@@ -16,7 +16,7 @@
 /log/
 /pkg/
 /spec/fixtures/manifests/
-/spec/fixtures/modules/
+/spec/fixtures/modules/*
 /tmp/
 /vendor/
 /convert_report.txt
 .envrc
 /inventory.yaml
 /spec/fixtures/litmus_inventory.yaml
-/appveyor.yml
-/.editorconfig
 /.fixtures.yml
 /Gemfile
 /.gitattributes
+/.github/
 /.gitignore
-/.gitlab-ci.yml
 /.pdkignore
 /.puppet-lint.rc
 /Rakefile
 /rakelib/
 /.rspec
-/.rubocop.yml
+/..yml
 /.yardopts
 /spec/
 /.vscode/
index 31e8248ff813e956702d5c67844aeb0e2affc917..5be1f9fa994085890c3fe9db117a937b8928f8cb 100644 (file)
@@ -4,7 +4,7 @@ require:
 - rubocop-rspec
 AllCops:
   DisplayCopNames: true
-  TargetRubyVersion: '2.5'
+  TargetRubyVersion: '2.6'
   Include:
   - "**/*.rb"
   Exclude:
@@ -111,8 +111,14 @@ Style/MethodCalledOnDoEndBlock:
   Enabled: true
 Style/StringMethods:
   Enabled: true
+Bundler/GemFilename:
+  Enabled: false
 Bundler/InsecureProtocolSource:
   Enabled: false
+Capybara/CurrentPathExpectation:
+  Enabled: false
+Capybara/VisibilityMatcher:
+  Enabled: false
 Gemspec/DuplicatedAssignment:
   Enabled: false
 Gemspec/OrderedDependencies:
@@ -287,11 +293,9 @@ Performance/UriDefaultParser:
   Enabled: false
 RSpec/Be:
   Enabled: false
-RSpec/Capybara/CurrentPathExpectation:
-  Enabled: false
 RSpec/Capybara/FeatureMethods:
   Enabled: false
-RSpec/Capybara/VisibilityMatcher:
+RSpec/ContainExactly:
   Enabled: false
 RSpec/ContextMethod:
   Enabled: false
@@ -331,6 +335,8 @@ RSpec/LeakyConstantDeclaration:
   Enabled: false
 RSpec/LetBeforeExamples:
   Enabled: false
+RSpec/MatchArray:
+  Enabled: false
 RSpec/MissingExampleGroupArgument:
   Enabled: false
 RSpec/MultipleExpectations:
@@ -373,8 +379,6 @@ Style/AccessModifierDeclarations:
   Enabled: false
 Style/AccessorGrouping:
   Enabled: false
-Style/AsciiComments:
-  Enabled: false
 Style/BisectedAttrAccessor:
   Enabled: false
 Style/CaseLikeIf:
@@ -485,35 +489,235 @@ Style/TrailingMethodEndStatement:
   Enabled: false
 Style/UnpackFirst:
   Enabled: false
+Capybara/MatchStyle:
+  Enabled: false
+Capybara/NegationMatcher:
+  Enabled: false
+Capybara/SpecificActions:
+  Enabled: false
+Capybara/SpecificFinders:
+  Enabled: false
+Capybara/SpecificMatcher:
+  Enabled: false
+Gemspec/DeprecatedAttributeAssignment:
+  Enabled: false
+Gemspec/DevelopmentDependencies:
+  Enabled: false
+Gemspec/RequireMFA:
+  Enabled: false
+Layout/LineContinuationLeadingSpace:
+  Enabled: false
+Layout/LineContinuationSpacing:
+  Enabled: false
+Layout/LineEndStringConcatenationIndentation:
+  Enabled: false
+Layout/SpaceBeforeBrackets:
+  Enabled: false
+Lint/AmbiguousAssignment:
+  Enabled: false
+Lint/AmbiguousOperatorPrecedence:
+  Enabled: false
+Lint/AmbiguousRange:
+  Enabled: false
+Lint/ConstantOverwrittenInRescue:
+  Enabled: false
+Lint/DeprecatedConstants:
+  Enabled: false
 Lint/DuplicateBranch:
   Enabled: false
+Lint/DuplicateMagicComment:
+  Enabled: false
 Lint/DuplicateRegexpCharacterClassElement:
   Enabled: false
 Lint/EmptyBlock:
   Enabled: false
 Lint/EmptyClass:
   Enabled: false
+Lint/EmptyInPattern:
+  Enabled: false
+Lint/IncompatibleIoSelectWithFiberScheduler:
+  Enabled: false
+Lint/LambdaWithoutLiteralBlock:
+  Enabled: false
 Lint/NoReturnInBeginEndBlocks:
   Enabled: false
+Lint/NonAtomicFileOperation:
+  Enabled: false
+Lint/NumberedParameterAssignment:
+  Enabled: false
+Lint/OrAssignmentToConstant:
+  Enabled: false
+Lint/RedundantDirGlobSort:
+  Enabled: false
+Lint/RefinementImportMethods:
+  Enabled: false
+Lint/RequireRangeParentheses:
+  Enabled: false
+Lint/RequireRelativeSelfPath:
+  Enabled: false
+Lint/SymbolConversion:
+  Enabled: false
 Lint/ToEnumArguments:
   Enabled: false
+Lint/TripleQuotes:
+  Enabled: false
 Lint/UnexpectedBlockArity:
   Enabled: false
 Lint/UnmodifiedReduceAccumulator:
   Enabled: false
+Lint/UselessRescue:
+  Enabled: false
+Lint/UselessRuby2Keywords:
+  Enabled: false
+Metrics/CollectionLiteralLength:
+  Enabled: false
+Naming/BlockForwarding:
+  Enabled: false
 Performance/CollectionLiteralInLoop:
   Enabled: false
+Performance/ConcurrentMonotonicTime:
+  Enabled: false
+Performance/MapCompact:
+  Enabled: false
+Performance/RedundantEqualityComparisonBlock:
+  Enabled: false
+Performance/RedundantSplitRegexpArgument:
+  Enabled: false
+Performance/StringIdentifierArgument:
+  Enabled: false
+RSpec/BeEq:
+  Enabled: false
+RSpec/BeNil:
+  Enabled: false
+RSpec/ChangeByZero:
+  Enabled: false
+RSpec/ClassCheck:
+  Enabled: false
+RSpec/DuplicatedMetadata:
+  Enabled: false
+RSpec/ExcessiveDocstringSpacing:
+  Enabled: false
+RSpec/FactoryBot/ConsistentParenthesesStyle:
+  Enabled: false
+RSpec/FactoryBot/FactoryNameStyle:
+  Enabled: false
+RSpec/FactoryBot/SyntaxMethods:
+  Enabled: false
+RSpec/IdenticalEqualityAssertion:
+  Enabled: false
+RSpec/NoExpectationExample:
+  Enabled: false
+RSpec/PendingWithoutReason:
+  Enabled: false
+RSpec/Rails/AvoidSetupHook:
+  Enabled: false
+RSpec/Rails/HaveHttpStatus:
+  Enabled: false
+RSpec/Rails/InferredSpecType:
+  Enabled: false
+RSpec/Rails/MinitestAssertions:
+  Enabled: false
+RSpec/Rails/TravelAround:
+  Enabled: false
+RSpec/RedundantAround:
+  Enabled: false
+RSpec/SkipBlockInsideExample:
+  Enabled: false
+RSpec/SortMetadata:
+  Enabled: false
+RSpec/SubjectDeclaration:
+  Enabled: false
+RSpec/VerifiedDoubleReference:
+  Enabled: false
+Security/CompoundHash:
+  Enabled: false
+Security/IoMethods:
+  Enabled: false
 Style/ArgumentsForwarding:
   Enabled: false
+Style/ArrayIntersect:
+  Enabled: false
 Style/CollectionCompact:
   Enabled: false
+Style/ComparableClamp:
+  Enabled: false
+Style/ConcatArrayLiterals:
+  Enabled: false
+Style/DirEmpty:
+  Enabled: false
 Style/DocumentDynamicEvalDefinition:
   Enabled: false
+Style/EmptyHeredoc:
+  Enabled: false
+Style/EndlessMethod:
+  Enabled: false
+Style/EnvHome:
+  Enabled: false
+Style/FetchEnvVar:
+  Enabled: false
+Style/FileEmpty:
+  Enabled: false
+Style/FileRead:
+  Enabled: false
+Style/FileWrite:
+  Enabled: false
+Style/HashConversion:
+  Enabled: false
+Style/HashExcept:
+  Enabled: false
+Style/IfWithBooleanLiteralBranches:
+  Enabled: false
+Style/InPatternThen:
+  Enabled: false
+Style/MagicCommentFormat:
+  Enabled: false
+Style/MapCompactWithConditionalBlock:
+  Enabled: false
+Style/MapToHash:
+  Enabled: false
+Style/MapToSet:
+  Enabled: false
+Style/MinMaxComparison:
+  Enabled: false
+Style/MultilineInPatternThen:
+  Enabled: false
 Style/NegatedIfElseCondition:
   Enabled: false
+Style/NestedFileDirname:
+  Enabled: false
 Style/NilLambda:
   Enabled: false
+Style/NumberedParameters:
+  Enabled: false
+Style/NumberedParametersLimit:
+  Enabled: false
+Style/ObjectThen:
+  Enabled: false
+Style/OpenStructUse:
+  Enabled: false
+Style/OperatorMethodCall:
+  Enabled: false
+Style/QuotedSymbols:
+  Enabled: false
 Style/RedundantArgument:
   Enabled: false
+Style/RedundantConstantBase:
+  Enabled: false
+Style/RedundantDoubleSplatHashBraces:
+  Enabled: false
+Style/RedundantEach:
+  Enabled: false
+Style/RedundantHeredocDelimiterQuotes:
+  Enabled: false
+Style/RedundantInitialize:
+  Enabled: false
+Style/RedundantSelfAssignmentBranch:
+  Enabled: false
+Style/RedundantStringEscape:
+  Enabled: false
+Style/SelectByRegexp:
+  Enabled: false
+Style/StringChars:
+  Enabled: false
 Style/SwapValues:
   Enabled: false
index 979c19930679b8194a952d890e5a33a388742bd4..48a1c77066496744a853c85dbddaf5af42fa7dcc 100644 (file)
--- a/.sync.yml
+++ b/.sync.yml
@@ -16,23 +16,22 @@ Gemfile:
       - gem: beaker-puppet
         from_env: BEAKER_PUPPET_VERSION
         version: '~> 1.22'
-      - gem: github_changelog_generator
-        version: '= 1.16.4'
-      - gem: concurrent-ruby
-        version: '= 1.1.10'
       - gem: async
         version: '~> 1'
       - gem: beaker-module_install_helper
       - gem: beaker-puppet_install_helper
       - gem: nokogiri
+    ":system_tests":
+      - gem: voxpupuli-acceptance
 
 appveyor.yml:
   delete: true
 .travis.yml:
   delete: true
-.github/workflows/auto_release.yml:
-  unmanaged: false
-.github/workflows/release.yml:
-  unmanaged: false
 .gitlab-ci.yml:
   delete: true
+# We still use the Vox acceptance Rake task instead of Litmus
+Rakefile:
+  requires:
+    - require: voxpupuli/acceptance/rake
+      conditional: Gem.loaded_specs.key? 'voxpupuli-acceptance'
diff --git a/Gemfile b/Gemfile
index e5d46032f07e2a2bc3b8b3e983bc17706d386f89..773968869e39580f04d9b34d3d08f9ff2e7a672a 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -19,20 +19,22 @@ group :development do
   gem "json", '= 2.5.1',                                                        require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
   gem "json", '= 2.6.1',                                                        require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
   gem "json", '= 2.6.3',                                                        require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
-  gem "voxpupuli-puppet-lint-plugins", '~> 4.0',                                require: false
+  gem "racc", '~> 1.4.0',                                                       require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
+  gem "voxpupuli-puppet-lint-plugins", '~> 5.0',                                require: false
   gem "facterdb", '~> 1.18',                                                    require: false
-  gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0',                              require: false
-  gem "puppetlabs_spec_helper", '~> 5.0',                                       require: false
+  gem "metadata-json-lint", '~> 3.0',                                           require: false
+  gem "puppetlabs_spec_helper", '~> 6.0',                                       require: false
   gem "rspec-puppet-facts", '~> 2.0',                                           require: false
   gem "codecov", '~> 0.2',                                                      require: false
-  gem "dependency_checker", '~> 0.2',                                           require: false
+  gem "dependency_checker", '~> 1.0.0',                                         require: false
   gem "parallel_tests", '= 3.12.1',                                             require: false
   gem "pry", '~> 0.10',                                                         require: false
   gem "simplecov-console", '~> 0.5',                                            require: false
   gem "puppet-debugger", '~> 1.0',                                              require: false
-  gem "rubocop", '= 1.6.1',                                                     require: false
-  gem "rubocop-performance", '= 1.9.1',                                         require: false
-  gem "rubocop-rspec", '= 2.0.1',                                               require: false
+  gem "rubocop", '= 1.48.1',                                                    require: false
+  gem "rubocop-performance", '= 1.16.0',                                        require: false
+  gem "rubocop-rspec", '= 2.19.0',                                              require: false
+  gem "puppet-strings", '~> 4.0',                                               require: false
   gem "rb-readline", '= 0.5.5',                                                 require: false, platforms: [:mswin, :mingw, :x64_mingw]
   gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.30')
   gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.9')
@@ -40,17 +42,19 @@ group :development do
   gem "beaker-hostgenerator"
   gem "beaker-rspec"
   gem "beaker-puppet", *location_for(ENV['BEAKER_PUPPET_VERSION'] || '~> 1.22')
-  gem "github_changelog_generator", '= 1.16.4',                                 require: false
-  gem "concurrent-ruby", '= 1.1.10',                                            require: false
   gem "async", '~> 1',                                                          require: false
   gem "beaker-module_install_helper",                                           require: false
   gem "beaker-puppet_install_helper",                                           require: false
   gem "nokogiri",                                                               require: false
 end
 group :system_tests do
-  gem "puppet_litmus", '< 1.0.0', require: false, platforms: [:ruby, :x64_mingw]
-  gem "serverspec", '~> 2.41',    require: false
-  gem "voxpupuli-acceptance"
+  gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
+  gem "serverspec", '~> 2.41',   require: false
+  gem "voxpupuli-acceptance",    require: false
+end
+group :release_prep do
+  gem "puppet-strings", '~> 4.0',         require: false
+  gem "puppetlabs_spec_helper", '~> 6.0', require: false
 end
 
 puppet_version = ENV['PUPPET_GEM_VERSION']
index 10ddd141125b662d9feea9794acfa6b7f407f99d..a0e7eb67de8a83d66d4aa2aae082ab1519b43be4 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,13 +1,12 @@
 # frozen_string_literal: true
 
 require 'bundler'
-require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
+require 'puppet_litmus/rake_tasks' if Gem.loaded_specs.key? 'puppet_litmus'
 require 'puppetlabs_spec_helper/rake_tasks'
 require 'puppet-syntax/tasks/puppet-syntax'
-require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
-require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
-require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
-require 'voxpupuli/acceptance/rake'
+require 'github_changelog_generator/task' if Gem.loaded_specs.key? 'github_changelog_generator'
+require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings'
+require 'voxpupuli/acceptance/rake' if Gem.loaded_specs.key? 'voxpupuli-acceptance'
 
 def changelog_user
   return unless Rake.application.top_level_tasks.include? "changelog"
@@ -45,7 +44,7 @@ end
 PuppetLint.configuration.send('disable_relative')
 
 
-if Bundler.rubygems.find_name('github_changelog_generator').any?
+if Gem.loaded_specs.key? 'github_changelog_generator'
   GitHubChangelogGenerator::RakeTask.new :changelog do |config|
     raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
     config.user = "#{changelog_user}"
index bd99ed2b1479648e2f000b62fe5ee95f3dee9e73..07d2b0545dcd9c6f684de77b56c2613c89f90c05 100644 (file)
@@ -57,7 +57,7 @@
       "version_requirement": ">= 6.0.0 < 9.0.0"
     }
   ],
-  "pdk-version": "2.7.1",
-  "template-url": "https://github.com/puppetlabs/pdk-templates#2.7.4",
-  "template-ref": "tags/2.7.4-0-g58edf57"
+  "pdk-version": "3.0.1",
+  "template-url": "https://github.com/puppetlabs/pdk-templates#3.0.1",
+  "template-ref": "tags/3.0.1-0-gd13288a"
 }
index f777abfc9905202e7ccf5b5fcc76b9b4c59a39fb..3346c394df5a06fba389c76f1e2ccbb04c77ee6c 100644 (file)
@@ -2,7 +2,8 @@
 #
 # Facts specified here will override the values provided by rspec-puppet-facts.
 ---
-ipaddress: "172.16.254.254"
-ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
+networking:
+  ip: "172.16.254.254"
+  ip6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
+  mac: "AA:AA:AA:AA:AA:AA"
 is_pe: false
-macaddress: "AA:AA:AA:AA:AA:AA"
index 9b1fa6f264d1019af8007726d2df751a5716ffce..6820cebee764dcc0869db01cf799901151fa73c5 100644 (file)
@@ -25,8 +25,8 @@ default_fact_files.each do |f|
   next unless File.exist?(f) && File.readable?(f) && File.size?(f)
 
   begin
-    default_facts.merge!(YAML.safe_load(File.read(f), [], [], true))
-  rescue => e
+    default_facts.merge!(YAML.safe_load(File.read(f), permitted_classes: [], permitted_symbols: [], aliases: true))
+  rescue StandardError => e
     RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
   end
 end
@@ -46,6 +46,7 @@ RSpec.configure do |c|
   end
   c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT']
   c.after(:suite) do
+    RSpec::Puppet::Coverage.report!(0)
   end
 
   # Filter backtrace noise