Showing with 4,687 additions and 2,662 deletions.
  1. +6 −0 .devcontainer/Dockerfile
  2. +23 −0 .devcontainer/devcontainer.json
  3. +0 −1 .gitattributes
  4. +84 −0 .github/workflows/auto_release.yml
  5. +47 −0 .github/workflows/release.yml
  6. +24 −25 .gitignore
  7. +3 −5 .pdkignore
  8. +1 −0 .puppet-lint.rc
  9. +260 −438 .rubocop.yml
  10. +57 −100 .sync.yml
  11. +6 −0 .vscode/extensions.json
  12. +1 −0 .yardopts
  13. +21 −3 CHANGELOG.md
  14. +2 −2 CODEOWNERS
  15. +58 −85 Gemfile
  16. +615 −0 HISTORY.md
  17. 0 README.markdown → README.md
  18. +1,118 −0 REFERENCE.md
  19. +77 −57 Rakefile
  20. +349 −355 acceptance/helpers.rb
  21. +1 −1 acceptance/options.rb
  22. +10 −11 acceptance/pre_suite/00_master_setup.rb
  23. +7 −7 acceptance/tests/test_upgrade_puppet5_to_puppet6.rb
  24. +9 −8 acceptance/tests/test_upgrade_puppet6_to_puppet7.rb
  25. +1 −0 data/common.yaml
  26. +1 −1 docker/centos/Dockerfile
  27. +1 −1 docker/centos/Dockerfile.versions
  28. +52 −53 files/rb_task_helper.rb
  29. +21 −0 hiera.yaml
  30. +7 −10 lib/facter/mco_config.rb
  31. +4 −4 lib/facter/puppet_agent_appdata.rb
  32. +3 −3 lib/facter/settings.rb
  33. +1 −2 lib/puppet/functions/any_resources_of_type.rb
  34. +1 −3 lib/puppet/parser/functions/uri_host_from_string.rb
  35. +1 −2 lib/puppet/parser/functions/windows_msi_installargs.rb
  36. +2 −3 lib/puppet/parser/functions/windows_native_path.rb
  37. +12 −12 lib/puppet/provider/puppet_agent_end_run/puppet_agent_end_run.rb
  38. +14 −15 lib/puppet/provider/puppet_agent_upgrade_error/puppet_agent_upgrade_error.rb
  39. +4 −4 lib/puppet/type/puppet_agent_end_run.rb
  40. +4 −6 lib/puppet/type/puppet_agent_upgrade_error.rb
  41. +1 −1 manifests/osfamily/darwin.pp
  42. +35 −8 metadata.json
  43. +2 −0 pdk.yaml
  44. +25 −0 rakelib/commits.rake
  45. +30 −0 rakelib/gen_nodeset.rake
  46. +57 −54 spec/acceptance/class_spec.rb
  47. +22 −17 spec/classes/puppet_agent_configure_spec.rb
  48. +59 −53 spec/classes/puppet_agent_osfamily_aix_spec.rb
  49. +64 −59 spec/classes/puppet_agent_osfamily_darwin_spec.rb
  50. +210 −177 spec/classes/puppet_agent_osfamily_debian_spec.rb
  51. +170 −139 spec/classes/puppet_agent_osfamily_redhat_spec.rb
  52. +135 −126 spec/classes/puppet_agent_osfamily_solaris_spec.rb
  53. +200 −157 spec/classes/puppet_agent_osfamily_suse_spec.rb
  54. +52 −48 spec/classes/puppet_agent_osfamily_windows_spec.rb
  55. +1 −1 spec/classes/puppet_agent_params_spec.rb
  56. +23 −22 spec/classes/puppet_agent_spec.rb
  57. +194 −144 spec/classes/puppet_agent_windows_install_spec.rb
  58. +59 −15 spec/spec_helper.rb
  59. +74 −74 spec/spec_helper_acceptance.rb
  60. +53 −51 spec/spec_helper_local.rb
  61. +9 −7 spec/type_aliases/config_spec.rb
  62. +11 −7 spec/unit/facter/settings_spec.rb
  63. +18 −17 spec/unit/functions/any_resources_of_type_spec.rb
  64. +7 −8 spec/unit/puppet/provider/puppet_agent_end_run_spec.rb
  65. +7 −13 task_spec/spec/acceptance/init_spec.rb
  66. +1 −1 task_spec/spec/spec_helper_acceptance.rb
  67. +36 −35 tasks/delete_local_filebucket.rb
  68. +34 −29 tasks/facts_diff.rb
  69. +10 −0 tasks/install_shell.sh
  70. +175 −182 tasks/run.rb
  71. +5 −0 types/config_setting.pp
6 changes: 6 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM puppet/pdk:latest

# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
{
"name": "Puppet Development Kit (Community)",
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pdk --version",
}
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#This file is generated by ModuleSync, do not edit.
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
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@v2
with:
fetch-depth: 0
persist-credentials: false

- name: "PDK Release prep"
uses: docker://puppet/iac_release:ci
with:
args: 'release prep --force'
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: "Commit changes"
if: ${{ github.repository_owner == 'puppetlabs' }}
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' }}
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' }}
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'
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Publish module"

on:
workflow_dispatch:

jobs:
create-github-release:
name: Deploy GitHub Release
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
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@v2
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'
49 changes: 24 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# This file is generated by ModuleSync, do not edit.
*.iml
.git/
.*.sw[op]
.DS_Store
.beaker/
.bundle/
.idea/
.metadata
.vagrant/
.yardoc
.yardwarns
Gemfile.local
Gemfile.lock
bin/
coverage/
doc/
hosts.yaml
hosts.yml
junit/
log/
pkg/
spec/fixtures/manifests/
spec/fixtures/modules/
task_spec/spec/fixtures/manifests/
task_spec/spec/fixtures/modules/
tmp/
vendor/

.*.sw?
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
8 changes: 3 additions & 5 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@
/.bundle/
/.idea/
/.vagrant/
/acceptance/
/coverage/
/bin/
/doc/
/docker/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/task_spec/
/tmp/
/vendor/
/convert_report.txt
Expand All @@ -28,22 +25,23 @@
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/appveyor.yml
/.editorconfig
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.github/
/.gitlab-ci.yml
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
/.rubocop.yml
/.rubocop_todo.yml
/.travis.yml
/.yardopts
/spec/
/.vscode/
/.sync.yml
/.devcontainer/
1 change: 1 addition & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--relative
Loading