-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32315d8
commit d19da86
Showing
38 changed files
with
1,529 additions
and
959 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,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> | ||
|
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,38 @@ | ||
# devcontainer | ||
|
||
|
||
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 | ||
|
||
``` json | ||
{ | ||
"name": "Puppet Development Kit (Community)", | ||
"dockerFile": "Dockerfile", | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "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", | ||
} | ||
``` | ||
|
||
|
||
|
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,17 @@ | ||
{ | ||
"name": "Puppet Development Kit (Community)", | ||
"dockerFile": "Dockerfile", | ||
|
||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "bash", | ||
} | ||
} | ||
}, | ||
|
||
"extensions": [ | ||
"puppet.puppet-vscode", | ||
"rebornix.Ruby" | ||
] | ||
} |
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,11 @@ | ||
# 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: | ||
repositories: | ||
stdlib: | ||
repo: https://github.com/puppetlabs/puppetlabs-stdlib.git | ||
host_core: | ||
repo: https://github.com/puppetlabs/puppetlabs-host_core.git | ||
symlinks: | ||
hosts: "#{source_dir}" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
--- | ||
fixtures: | ||
repositories: | ||
host: | ||
repo: 'git://github.com/puppetlabs/puppetlabs-host_core.git' | ||
ref: '1.0.1' | ||
stdlib: | ||
'stdlib': | ||
repo: 'https://github.com/puppetlabs/puppetlabs-stdlib.git' | ||
ref: '4.6.0' | ||
ref: 'v8.0.0' | ||
'host_core': | ||
repo: 'https://github.com/puppetlabs/puppetlabs-host_core.git' | ||
ref: 'v1.1.0' | ||
symlinks: | ||
hosts: "#{source_dir}" |
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,82 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
unit: | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.allow_failure }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- ruby: 2.7.0 | ||
puppet: 7 | ||
fixtures: .fixtures.yml | ||
allow_failure: false | ||
- ruby: 2.7.0 | ||
puppet: 7 | ||
fixtures: .fixtures-latest.yml | ||
allow_failure: true | ||
env: | ||
BUNDLE_WITHOUT: system_tests:release | ||
PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0" | ||
FACTER_GEM_VERSION: "< 4.0" | ||
FIXTURES_YML: ${{ matrix.fixtures }} | ||
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }} fixtures=${{ matrix.fixtures }}) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
bundler: '2.1.0' | ||
- name: Validate | ||
run: bundle exec rake check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint | ||
- name: Run tests | ||
run: bundle exec rake parallel_spec | ||
acceptance: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
set: | ||
- "debian-10" | ||
- "rocky-8" | ||
- "ubuntu-1804" | ||
puppet: | ||
- "puppet7" | ||
env: | ||
BUNDLE_WITHOUT: development:release | ||
BEAKER_debug: true | ||
name: | ||
steps: | ||
- name: Enable IPv6 on docker | ||
run: | | ||
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json | ||
sudo service docker restart | ||
# https://github.com/actions/virtual-environments/issues/181#issuecomment-610874237 | ||
- name: apparmor | ||
run: | | ||
set -x | ||
sudo apt-get remove mysql-server --purge | ||
sudo apt-get install apparmor-profiles | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
- uses: actions/checkout@v2 | ||
- name: Setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
bundler-cache: true | ||
bundler: '2.1.0' | ||
- name: Run tests | ||
run: bundle exec rake beaker | ||
env: | ||
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }} | ||
BEAKER_set: ${{ matrix.set }} |
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,30 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
BUNDLE_WITHOUT: system_tests | ||
|
||
jobs: | ||
deploy: | ||
name: 'deploy to forge' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
bundler-cache: true | ||
bundler: '2.1.0' | ||
- name: Build and Deploy | ||
env: | ||
# Configure secrets here: | ||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets | ||
BLACKSMITH_FORGE_USERNAME: 'ghoneycutt' | ||
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}' | ||
run: bundle exec rake module:push |
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 |
---|---|---|
@@ -1,34 +1,28 @@ | ||
# Default .gitignore for Ruby | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
coverage | ||
InstalledFiles | ||
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
tmp | ||
|
||
# YARD artifacts | ||
.git/ | ||
.*.sw[op] | ||
.metadata | ||
.yardoc | ||
_yardoc | ||
doc/ | ||
|
||
# Vim | ||
*.swp | ||
|
||
# Eclipse | ||
.project | ||
|
||
# OS X | ||
.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 | ||
|
||
# Puppet | ||
coverage/ | ||
spec/fixtures/manifests/* | ||
spec/fixtures/modules/* | ||
Gemfile.lock | ||
.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,45 @@ | ||
.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 | ||
/appveyor.yml | ||
/.fixtures.yml | ||
/Gemfile | ||
/.gitattributes | ||
/.gitignore | ||
/.gitlab-ci.yml | ||
/.pdkignore | ||
/Rakefile | ||
/rakelib/ | ||
/.rspec | ||
/.rubocop.yml | ||
/.travis.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,5 @@ | ||
--no-80chars-check | ||
--no-140chars-check | ||
--no-manifest_whitespace_opening_brace_after-check | ||
--relative | ||
--fail_on_warnings |
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.