-
Notifications
You must be signed in to change notification settings - Fork 794
update PDK template and workflows #1629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
h0tw1r3
wants to merge
15
commits into
puppetlabs:main
Choose a base branch
from
h0tw1r3:pdk
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d00c14b
(maint) use stdlib type for package_ensure params
h0tw1r3 0755646
(maint) pdk template update
h0tw1r3 5dc7272
(maint) unpin puppet_agent fixture
h0tw1r3 bf374fd
(maint) cleanup fixtures format
h0tw1r3 5ca543f
(maint) address some puppet-lint long lines
h0tw1r3 3abd563
(maint) update workflows
h0tw1r3 5385bf2
(maint) add expected private classes to unit tests
h0tw1r3 dc18436
(maint) set minimum code coverage
h0tw1r3 77bb30f
(maint) drop some puppet 3 support
h0tw1r3 c2ba9d5
(maint) fix mysql_login_path acceptance tests on arm
h0tw1r3 587d3be
(maint) fix all spec rubocops
h0tw1r3 821b81b
(maint) replace deprecated rspec should syntax
h0tw1r3 c28f0e6
(maint) spec default for root_home fact
h0tw1r3 110fc8c
(maint) spec fix nil expectation
h0tw1r3 10fd765
(maint) increase test coverage
h0tw1r3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
--- | ||
fixtures: | ||
repositories: | ||
"stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib" | ||
"cron_core": "https://github.com/puppetlabs/puppetlabs-cron_core.git" | ||
"facts": "https://github.com/puppetlabs/puppetlabs-facts.git" | ||
"provision": "https://github.com/puppetlabs/provision.git" | ||
puppet_agent: | ||
repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git' | ||
ref: v4.13.0 | ||
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib | ||
cron_core: https://github.com/puppetlabs/puppetlabs-cron_core.git | ||
facts: https://github.com/puppetlabs/puppetlabs-facts.git | ||
provision: https://github.com/puppetlabs/provision.git | ||
puppet_agent: https://github.com/puppetlabs/puppetlabs-puppet_agent.git |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,25 @@ | ||
name: "ci" | ||
name: "CI" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
workflow_dispatch: | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Spec: | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" | ||
with: | ||
runs_on: "ubuntu-20.04" | ||
secrets: "inherit" | ||
|
||
setup_matrix: | ||
name: "Setup Test Matrix" | ||
needs: "Spec" | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
matrix: ${{ steps.get-matrix.outputs.matrix }} | ||
|
||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Activate Ruby 2.7 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "2.7" | ||
bundler-cache: true | ||
|
||
- name: Print bundle environment | ||
run: | | ||
echo ::group::bundler environment | ||
bundle env | ||
echo ::endgroup:: | ||
|
||
- name: Setup Acceptance Test Matrix | ||
id: get-matrix | ||
run: | | ||
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Ubuntu-22.04-arm", "RedHat-9-arm"]' | ||
|
||
Acceptance: | ||
name: "${{matrix.platforms.label}}, ${{matrix.collection}}" | ||
needs: | ||
- setup_matrix | ||
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }} | ||
|
||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}} | ||
|
||
env: | ||
PUPPET_GEM_VERSION: '~> 7.24' | ||
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' | ||
|
||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Activate Ruby 2.7 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "2.7" | ||
bundler-cache: true | ||
|
||
- name: Print bundle environment | ||
run: | | ||
bundle env | ||
|
||
- name: "Disable mysqld apparmor profile" | ||
if: ${{matrix.platforms.provider == 'docker'}} | ||
run: | | ||
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | ||
sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld | ||
sudo systemctl disable apparmor | ||
sudo systemctl stop apparmor | ||
|
||
- name: Provision test environment | ||
run: | | ||
bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]' | ||
FILE='spec/fixtures/litmus_inventory.yaml' | ||
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true | ||
|
||
- name: Install agent | ||
run: | | ||
bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]' | ||
|
||
- name: Install module | ||
run: | | ||
bundle exec rake 'litmus:install_module' | ||
|
||
- name: Run acceptance tests | ||
run: | | ||
bundle exec rake 'litmus:acceptance:parallel' | ||
|
||
- name: Remove test environment | ||
if: ${{ always() }} | ||
continue-on-error: true | ||
run: | | ||
bundle exec rake 'litmus:tear_down' | ||
needs: Spec | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" | ||
secrets: "inherit" | ||
with: | ||
runs_on: ubuntu-20.04 | ||
kernel_modules: false | ||
disable_apparmor: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
name: "Publish module" | ||
run-name: > | ||
${{ format('tag={0}', inputs.tag) }} | ||
${{ format('release={0}', inputs.release) }} | ||
${{ format('publish={0}', inputs.publish) }} | ||
${{ format('edit={0}', inputs.edit) }} | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
inputs: | ||
tag: | ||
description: "Leave blank to tag HEAD of branch, or existing tag to edit" | ||
default: '' | ||
type: string | ||
release: | ||
description: "Create a Github release" | ||
type: boolean | ||
default: true | ||
publish: | ||
description: "Publish to the Forge" | ||
type: boolean | ||
default: true | ||
edit: | ||
description: "Regenerate release notes and existing tag" | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
release: | ||
release: | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main" | ||
secrets: "inherit" | ||
with: | ||
tag: ${{ inputs.tag }} | ||
release: ${{ inputs.release }} | ||
publish: ${{ inputs.publish }} | ||
edit: ${{ inputs.edit }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.