Showing with 1,788 additions and 1,925 deletions.
  1. +2 −5 .fixtures.yml
  2. +9 −86 .github/workflows/auto_release.yml
  3. +3 −41 .github/workflows/release.yml
  4. +0 −1 .gitignore
  5. +2 −5 .rubocop.yml
  6. +3 −2 .sync.yml
  7. +682 −584 CHANGELOG.md
  8. +6 −8 Gemfile
  9. +248 −302 REFERENCE.md
  10. +5 −1 Rakefile
  11. +1 −1 docker/upgrade.pp
  12. +1 −1 examples/init.pp
  13. +51 −53 files/rb_task_helper.rb
  14. +5 −0 lib/puppet/functions/any_resources_of_type.rb
  15. +1 −1 lib/puppet/parser/functions/uri_host_from_string.rb
  16. +1 −1 lib/puppet/parser/functions/windows_msi_installargs.rb
  17. +2 −1 lib/puppet/parser/functions/windows_native_path.rb
  18. +2 −0 lib/puppet/provider/puppet_agent_end_run/puppet_agent_end_run.rb
  19. +6 −0 lib/puppet/provider/puppet_agent_upgrade_error/puppet_agent_upgrade_error.rb
  20. +2 −0 manifests/configure.pp
  21. +70 −65 manifests/init.pp
  22. +25 −19 manifests/install.pp
  23. +18 −11 manifests/install/darwin.pp
  24. +22 −15 manifests/install/solaris.pp
  25. +19 −11 manifests/install/suse.pp
  26. +41 −31 manifests/install/windows.pp
  27. +26 −28 manifests/osfamily/aix.pp
  28. +11 −10 manifests/osfamily/darwin.pp
  29. +20 −19 manifests/osfamily/debian.pp
  30. +30 −25 manifests/osfamily/redhat.pp
  31. +19 −18 manifests/osfamily/solaris.pp
  32. +24 −21 manifests/osfamily/suse.pp
  33. +15 −14 manifests/osfamily/windows.pp
  34. +11 −17 manifests/params.pp
  35. +5 −11 manifests/prepare.pp
  36. +13 −17 manifests/prepare/package.pp
  37. +6 −6 manifests/prepare/puppet_config.pp
  38. +6 −9 manifests/service.pp
  39. +5 −5 metadata.json
  40. +1 −1 rakelib/commits.rake
  41. +4 −61 spec/acceptance/class_spec.rb
  42. +28 −57 spec/classes/puppet_agent_osfamily_aix_spec.rb
  43. +1 −6 spec/classes/puppet_agent_osfamily_darwin_spec.rb
  44. +2 −6 spec/classes/puppet_agent_osfamily_debian_spec.rb
  45. +5 −9 spec/classes/puppet_agent_osfamily_redhat_spec.rb
  46. +6 −14 spec/classes/puppet_agent_osfamily_solaris_spec.rb
  47. +6 −10 spec/classes/puppet_agent_osfamily_suse_spec.rb
  48. +6 −4 spec/classes/puppet_agent_osfamily_windows_spec.rb
  49. +12 −0 spec/classes/puppet_agent_params_spec.rb
  50. +1 −13 spec/classes/puppet_agent_spec.rb
  51. +0 −4 spec/classes/puppet_agent_windows_install_spec.rb
  52. +0 −14 spec/default_facts.yml
  53. +3 −2 spec/spec_helper_acceptance.rb
  54. +16 −3 task_spec/spec/acceptance/init_spec.rb
  55. +1 −0 task_spec/spec/spec_helper_acceptance.rb
  56. +37 −39 tasks/delete_local_filebucket.rb
  57. +44 −46 tasks/facts_diff.rb
  58. +3 −9 tasks/install_shell.sh
  59. +180 −182 tasks/run.rb
  60. +1 −0 types/arch.pp
  61. +1 −0 types/config.pp
  62. +12 −0 types/config_setting.pp
7 changes: 2 additions & 5 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
fixtures:
repositories:
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib'
forge_modules:
stdlib:
repo: "puppetlabs/stdlib"
ref: "8.4.0"
inifile:
repo: "puppetlabs/inifile"
ref: "5.3.0"
Expand All @@ -17,5 +16,3 @@ fixtures:
facts:
repo: "puppetlabs/facts"
ref: "1.4.0"
symlinks:
puppet_agent: "#{source_dir}"
95 changes: 9 additions & 86 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,91 +2,14 @@ name: "Auto release"

on:
workflow_dispatch:

env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
inputs:
version:
description: "Module version to be released. Must be a valid semver string. (1.2.3)"
required: true

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'
release_prep:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main"
with:
version: "${{ github.event.inputs.version }}"
secrets: "inherit"
44 changes: 3 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
.vscode/
7 changes: 2 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Style/BlockDelimiters:
be consistent then.
EnforcedStyle: braces_for_chaining
Style/ClassAndModuleChildren:
Enabled: false
Description: Compact style reduces the required amount of indentation.
EnforcedStyle: compact
Style/EmptyElse:
Description: Enforce against empty else clauses, but allow `nil` for clarity.
EnforcedStyle: empty
Expand Down Expand Up @@ -78,12 +79,8 @@ RSpec/MessageSpies:
EnforcedStyle: receive
Style/Documentation:
Exclude:
- files/rb_task_helper.rb
- lib/puppet/parser/functions/**/*
- spec/**/*
- tasks/delete_local_filebucket.rb
- tasks/facts_diff.rb
- tasks/run.rb
Style/WordArray:
EnforcedStyle: brackets
Performance/AncestorsInclude:
Expand Down
5 changes: 3 additions & 2 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ Gemfile:
condition: 'ENV["GEM_BOLT"]'
- gem: async
version: '~> 1.30' # otherwise async 2.0.0(needs ruby >=3.1.0) is wrongly selected by bundler on jenkins while running with ruby 2.7.1
- gem: puppet_litmus
version: '0.34.5'
":system_tests":
- gem: voxpupuli-acceptance
version: '~> 1.0'
appveyor.yml:
delete: true
.travis.yml:
Expand Down
Loading