Skip to content

Commit d8050df

Browse files
authored
Merge pull request #3 from benformosa/pdk
Convert for PDK
2 parents d67bb54 + 56b5c7f commit d8050df

25 files changed

+1063
-56
lines changed

.devcontainer/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM puppet/pdk:latest
2+
3+
# [Optional] Uncomment this section to install additional packages.
4+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5+
# && apt-get -y install --no-install-recommends <your-package-list-here>
6+

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
3+
{
4+
"name": "Puppet Development Kit (Community)",
5+
"dockerFile": "Dockerfile",
6+
7+
// Set *default* container specific settings.json values on container create.
8+
"settings": {
9+
"terminal.integrated.shell.linux": "/bin/bash"
10+
},
11+
12+
// Add the IDs of extensions you want installed when the container is created.
13+
"extensions": [
14+
"puppet.puppet-vscode",
15+
"rebornix.Ruby"
16+
]
17+
18+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19+
// "forwardPorts": [],
20+
21+
// Use 'postCreateCommand' to run commands after the container is created.
22+
// "postCreateCommand": "pdk --version",
23+
}

.fixtures.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This file can be used to install module dependencies for unit testing
2+
# See https://github.com/puppetlabs/puppetlabs_spec_helper#using-fixtures for details
3+
---
4+
fixtures:
5+
forge_modules:
6+
# stdlib: "puppetlabs/stdlib"

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.rb eol=lf
2+
*.erb eol=lf
3+
*.pp eol=lf
4+
*.sh eol=lf
5+
*.epp eol=lf

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.git/
2+
.*.sw[op]
3+
.metadata
4+
.yardoc
5+
.yardwarns
6+
*.iml
7+
/.bundle/
8+
/.idea/
9+
/.vagrant/
10+
/coverage/
11+
/bin/
12+
/doc/
13+
/Gemfile.local
14+
/Gemfile.lock
15+
/junit/
16+
/log/
17+
/pkg/
18+
/spec/fixtures/manifests/
19+
/spec/fixtures/modules/
20+
/tmp/
21+
/vendor/
22+
/convert_report.txt
23+
/update_report.txt
24+
.DS_Store
25+
.project
26+
.envrc
27+
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml
29+
.config/

.gitlab-ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
stages:
3+
- syntax
4+
- unit
5+
6+
default:
7+
cache:
8+
paths:
9+
- vendor/bundle
10+
11+
before_script: &before_script
12+
- bundle -v
13+
- rm Gemfile.lock || true
14+
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
15+
- "# Set `rubygems_version` in the .sync.yml to set a value"
16+
- "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
17+
- '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
18+
- gem --version
19+
- bundle -v
20+
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
21+
22+
validate lint check rubocop-Ruby 2.5.7-Puppet ~> 6:
23+
stage: syntax
24+
image: ruby:2.5.7
25+
script:
26+
- bundle exec rake validate lint check rubocop
27+
variables:
28+
PUPPET_GEM_VERSION: '~> 6'
29+
30+
parallel_spec-Ruby 2.5.7-Puppet ~> 6:
31+
stage: unit
32+
image: ruby:2.5.7
33+
script:
34+
- bundle exec rake parallel_spec
35+
variables:
36+
PUPPET_GEM_VERSION: '~> 6'
37+
38+
validate lint check rubocop-Ruby 2.7.2-Puppet ~> 7:
39+
stage: syntax
40+
image: ruby:2.7.2
41+
script:
42+
- bundle exec rake validate lint check rubocop
43+
variables:
44+
PUPPET_GEM_VERSION: '~> 7'
45+
46+
parallel_spec-Ruby 2.7.2-Puppet ~> 7:
47+
stage: unit
48+
image: ruby:2.7.2
49+
script:
50+
- bundle exec rake parallel_spec
51+
variables:
52+
PUPPET_GEM_VERSION: '~> 7'
53+

.pdkignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.git/
2+
.*.sw[op]
3+
.metadata
4+
.yardoc
5+
.yardwarns
6+
*.iml
7+
/.bundle/
8+
/.idea/
9+
/.vagrant/
10+
/coverage/
11+
/bin/
12+
/doc/
13+
/Gemfile.local
14+
/Gemfile.lock
15+
/junit/
16+
/log/
17+
/pkg/
18+
/spec/fixtures/manifests/
19+
/spec/fixtures/modules/
20+
/tmp/
21+
/vendor/
22+
/convert_report.txt
23+
/update_report.txt
24+
.DS_Store
25+
.project
26+
.envrc
27+
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml
29+
/appveyor.yml
30+
/.editorconfig
31+
/.fixtures.yml
32+
/Gemfile
33+
/.gitattributes
34+
/.gitignore
35+
/.gitlab-ci.yml
36+
/.pdkignore
37+
/.puppet-lint.rc
38+
/Rakefile
39+
/rakelib/
40+
/.rspec
41+
/.rubocop.yml
42+
/.travis.yml
43+
/.yardopts
44+
/spec/
45+
/.vscode/
46+
/.sync.yml
47+
/.devcontainer/

.puppet-lint.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--relative

.rspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--color
2+
--format documentation

0 commit comments

Comments
 (0)