Skip to content

Commit 397e386

Browse files
authored
Merge pull request #25 from puppetlabs/CONT-788-add_puppet8_support
(CONT-788) - Add Puppet 8/Drop Puppet 6
2 parents c447b9b + 27f5915 commit 397e386

File tree

21 files changed

+194
-279
lines changed

21 files changed

+194
-279
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/README.md

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

.devcontainer/devcontainer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "Puppet Development Kit (Community)",
3+
"dockerFile": "Dockerfile",
4+
5+
"settings": {
6+
"terminal.integrated.profiles.linux": {
7+
"bash": {
8+
"path": "bash"
9+
}
10+
}
11+
},
12+
13+
"extensions": [
14+
"puppet.puppet-vscode",
15+
"rebornix.Ruby"
16+
]
17+
}

.fixtures.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
fixtures:
2-
forge_modules:
3-
stdlib:
4-
repo: "puppetlabs/stdlib"
5-
ref: "4.24.0"
6-
powershell:
7-
repo: "puppetlabs/powershell"
8-
ref: "2.1.3"
2+
repositories:
3+
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
4+
powershell: 'https://github.com/puppetlabs/puppetlabs-powershell.git'
5+
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
6+
puppet_agent:
7+
repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
8+
ref: v4.13.0
9+
provision: 'https://github.com/puppetlabs/provision.git'
910
symlinks:
1011
mount_iso: "#{source_dir}"

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,3 @@ jobs:
1010
Spec:
1111
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
1212
secrets: "inherit"
13-
14-
Acceptance:
15-
needs: Spec
16-
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
17-
secrets: "inherit"

.github/workflows/nightly.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ jobs:
99
Spec:
1010
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
1111
secrets: "inherit"
12-
13-
Acceptance:
14-
needs: Spec
15-
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
16-
secrets: "inherit"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
.project
2626
.envrc
2727
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml

.gitlab-ci.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.pdkignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@
2525
.project
2626
.envrc
2727
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml
2829
/appveyor.yml
30+
/.editorconfig
2931
/.fixtures.yml
3032
/Gemfile
3133
/.gitattributes
3234
/.gitignore
3335
/.gitlab-ci.yml
3436
/.pdkignore
37+
/.puppet-lint.rc
3538
/Rakefile
3639
/rakelib/
3740
/.rspec
@@ -40,3 +43,5 @@
4043
/.yardopts
4144
/spec/
4245
/.vscode/
46+
/.sync.yml
47+
/.devcontainer/

.rubocop.yml

Lines changed: 16 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
---
2+
inherit_from: .rubocop_todo.yml
3+
24
require:
5+
- rubocop-performance
36
- rubocop-rspec
4-
- rubocop-i18n
57
AllCops:
8+
NewCops: enable
69
DisplayCopNames: true
7-
TargetRubyVersion: '2.1'
10+
ExtraDetails: true
11+
DisplayStyleGuide: true
12+
TargetRubyVersion: '2.7'
813
Include:
9-
- "./**/*.rb"
14+
- "**/*.rb"
1015
Exclude:
1116
- bin/*
1217
- ".vendor/**/*"
@@ -18,16 +23,9 @@ AllCops:
1823
- "**/Puppetfile"
1924
- "**/Vagrantfile"
2025
- "**/Guardfile"
21-
Metrics/LineLength:
26+
Layout/LineLength:
2227
Description: People have wide screens, use them.
2328
Max: 200
24-
GetText:
25-
Enabled: false
26-
GetText/DecorateString:
27-
Description: We don't want to decorate test output.
28-
Exclude:
29-
- spec/**/*
30-
Enabled: false
3129
RSpec/BeforeAfterAll:
3230
Description: Beware of using after(:all) as it may cause state to leak between tests.
3331
A necessary evil in acceptance testing.
@@ -36,6 +34,9 @@ RSpec/BeforeAfterAll:
3634
RSpec/HookArgument:
3735
Description: Prefer explicit :each argument, matching existing module's style
3836
EnforcedStyle: each
37+
RSpec/DescribeSymbol:
38+
Exclude:
39+
- spec/unit/facter/**/*.rb
3940
Style/BlockDelimiters:
4041
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
4142
be consistent then.
@@ -68,7 +69,7 @@ Style/TrailingCommaInArguments:
6869
Description: Prefer always trailing comma on multiline argument lists. This makes
6970
diffs, and re-ordering nicer.
7071
EnforcedStyleForMultiline: comma
71-
Style/TrailingCommaInLiteral:
72+
Style/TrailingCommaInArrayLiteral:
7273
Description: Prefer always trailing comma on multiline literals. This makes diffs,
7374
and re-ordering nicer.
7475
EnforcedStyleForMultiline: comma
@@ -83,51 +84,6 @@ Style/Documentation:
8384
- spec/**/*
8485
Style/WordArray:
8586
EnforcedStyle: brackets
86-
Style/CollectionMethods:
87-
Enabled: true
88-
Style/MethodCalledOnDoEndBlock:
89-
Enabled: true
90-
Style/StringMethods:
91-
Enabled: true
92-
GetText/DecorateFunctionMessage:
93-
Enabled: false
94-
GetText/DecorateStringFormattingUsingInterpolation:
95-
Enabled: false
96-
GetText/DecorateStringFormattingUsingPercent:
97-
Enabled: false
98-
Layout/EndOfLine:
99-
Enabled: false
100-
Layout/IndentHeredoc:
101-
Enabled: false
102-
Metrics/AbcSize:
103-
Enabled: false
104-
Metrics/BlockLength:
105-
Enabled: false
106-
Metrics/ClassLength:
107-
Enabled: false
108-
Metrics/CyclomaticComplexity:
109-
Enabled: false
110-
Metrics/MethodLength:
111-
Enabled: false
112-
Metrics/ModuleLength:
113-
Enabled: false
114-
Metrics/ParameterLists:
115-
Enabled: false
116-
Metrics/PerceivedComplexity:
117-
Enabled: false
118-
RSpec/DescribeClass:
119-
Enabled: false
120-
RSpec/ExampleLength:
121-
Enabled: false
122-
RSpec/MessageExpectation:
123-
Enabled: false
124-
RSpec/MultipleExpectations:
125-
Enabled: false
126-
RSpec/NestedGroups:
127-
Enabled: false
128-
Style/AsciiComments:
129-
Enabled: false
130-
Style/IfUnlessModifier:
131-
Enabled: false
132-
Style/SymbolProc:
133-
Enabled: false
87+
RSpec/NamedSubject:
88+
Exclude:
89+
- spec/defines/init_spec.rb

0 commit comments

Comments
 (0)