-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
- Loading branch information
0 parents
commit b3e6f65
Showing
39 changed files
with
2,405 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file can be used to install module dependencies for unit testing | ||
# See https://github.com/puppetlabs/puppetlabs_spec_helper#using-fixtures for details | ||
--- | ||
fixtures: | ||
forge_modules: | ||
stdlib: "puppetlabs/stdlib" | ||
systemd: "camptocamp/systemd" | ||
logrotate: "puppet/logrotate" |
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.rb eol=lf | ||
*.erb eol=lf | ||
*.pp eol=lf | ||
*.sh eol=lf | ||
*.epp eol=lf |
This file contains 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Build and publish to Puppet Forge | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get latest tag | ||
id: vars | ||
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.vars.outputs.tag }} | ||
- name: Build and publish module | ||
uses: barnumbirr/action-forge-publish@v2.7.0 | ||
env: | ||
FORGE_API_KEY: ${{ secrets.FORGE_API_KEY }} | ||
REPOSITORY_URL: https://forgeapi.puppet.com/v3/releases |
This file contains 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: References check | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
reference_diff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install puppet-strings | ||
run: | | ||
sudo apt update | ||
sudo apt install -y ruby | ||
sudo gem install puppet puppet-strings | ||
- name: Generate temporary strings | ||
run: | | ||
puppet strings generate --format markdown --out /tmp/references.md -d | ||
- name: Compare the actual and expected | ||
run: | | ||
if ! cmp "REFERENCE.md" "/tmp/references.md"; then | ||
diff -u REFERENCE.md /tmp/references.md | ||
echo "Diff between expected references and the commited file, please regenerate references \ | ||
with puppet strings generate --format markdown --out REFERENCE.md and commit them" | ||
exit 1 | ||
else | ||
echo "References are up to date" | ||
fi |
This file contains 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Run syntax validation | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
syntax: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run static validation and save report to junit xml | ||
uses: puppets-epic-show-theatre/action-pdk-validate@v1 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Run unit tests | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
unit_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run unit tests and save report to junit xml | ||
uses: puppets-epic-show-theatre/action-pdk-test-unit@v1 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.git/ | ||
.*.sw[op] | ||
.metadata | ||
.yardoc | ||
.yardwarns | ||
*.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 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.git/ | ||
.*.sw[op] | ||
.metadata | ||
.yardoc | ||
.yardwarns | ||
*.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 | ||
/.fixtures.yml | ||
/Gemfile | ||
/.gitattributes | ||
/.gitignore | ||
/.pdkignore | ||
/.puppet-lint.rc | ||
/Rakefile | ||
/rakelib/ | ||
/.rspec | ||
/..yml | ||
/.yardopts | ||
/spec/ | ||
/.vscode/ | ||
/.sync.yml | ||
/.devcontainer/ |
This file contains 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.3.0 | ||
hooks: | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/mirrors-puppet-lint | ||
rev: v2.4.2 | ||
hooks: | ||
- id: puppet-lint | ||
args: | ||
- --with-filename | ||
- --no-autoloader_layout-check | ||
- --no-variable_scope-check | ||
- --no-documentation-check | ||
- --no-80chars-check | ||
- --no-arrow_alignment-check | ||
|
||
- repo: https://github.com/chriskuehl/puppet-pre-commit-hooks | ||
rev: v2.0.2 | ||
hooks: | ||
- id: puppet-validate | ||
- id: erb-validate |
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--relative | ||
--no-140chars-check |
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--color | ||
--format documentation |
Oops, something went wrong.