Skip to content

Commit b5d5aa6

Browse files
authored
Merge pull request #1223 from puppetlabs/pdksync_pdksync_heads/main-0-gf3911d3
pdksync - pdksync_heads/main-0-gf3911d3
2 parents 3b2fdae + c21b873 commit b5d5aa6

File tree

10 files changed

+71
-49
lines changed

10 files changed

+71
-49
lines changed

.devcontainer/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.shell.linux": "/bin/bash"
17+
},
18+
19+
// Add the IDs of extensions you want installed when the container is created.
20+
"extensions": [
21+
"puppet.puppet-vscode",
22+
"rebornix.Ruby"
23+
]
24+
25+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
26+
"forwardPorts": [],
27+
28+
// Use 'postCreateCommand' to run commands after the container is created.
29+
"postCreateCommand": "pdk --version",
30+
}
31+
```
32+
33+
34+

.devcontainer/devcontainer.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
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
31
{
42
"name": "Puppet Development Kit (Community)",
53
"dockerFile": "Dockerfile",
64

7-
// Set *default* container specific settings.json values on container create.
85
"settings": {
9-
"terminal.integrated.shell.linux": "/bin/bash"
6+
"terminal.integrated.profiles.linux": {
7+
"bash": {
8+
"path": "bash",
9+
}
10+
}
1011
},
1112

12-
// Add the IDs of extensions you want installed when the container is created.
1313
"extensions": [
1414
"puppet.puppet-vscode",
1515
"rebornix.Ruby"
1616
]
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",
2317
}

.github/workflows/auto_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
runs-on: ubuntu-20.04
1515

1616
steps:
17+
1718
- name: "Honeycomb: Start recording"
1819
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
1920
with:
@@ -25,7 +26,6 @@ jobs:
2526
run: |
2627
echo STEP_ID="auto-release" >> $GITHUB_ENV
2728
echo STEP_START=$(date +%s) >> $GITHUB_ENV
28-
2929
- name: "Checkout Source"
3030
if: ${{ github.repository_owner == 'puppetlabs' }}
3131
uses: actions/checkout@v2
@@ -83,7 +83,7 @@ jobs:
8383
run: |
8484
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
8585
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
86-
86+
8787
- name: "Honeycomb: Record finish step"
8888
if: ${{ always() }}
8989
run: |

.github/workflows/nightly.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ on:
44
schedule:
55
- cron: '0 0 * * *'
66

7+
78
env:
89
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
910
HONEYCOMB_DATASET: litmus tests
1011

1112
jobs:
1213
setup_matrix:
14+
if: ${{ github.repository_owner == 'puppetlabs' }}
1315
name: "Setup Test Matrix"
1416
runs-on: ubuntu-20.04
1517
outputs:
1618
matrix: ${{ steps.get-matrix.outputs.matrix }}
1719

1820
steps:
21+
1922
- name: "Honeycomb: Start recording"
2023
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
2124
with:
@@ -27,7 +30,6 @@ jobs:
2730
run: |
2831
echo STEP_ID=setup-environment >> $GITHUB_ENV
2932
echo STEP_START=$(date +%s) >> $GITHUB_ENV
30-
3133
- name: Checkout Source
3234
uses: actions/checkout@v2
3335
if: ${{ github.repository_owner == 'puppetlabs' }}
@@ -45,29 +47,27 @@ jobs:
4547
echo ::group::bundler environment
4648
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
4749
echo ::endgroup::
48-
50+
4951
- name: "Honeycomb: Record Setup Environment time"
5052
if: ${{ github.repository_owner == 'puppetlabs' }}
5153
run: |
5254
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
5355
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
5456
echo STEP_START=$(date +%s) >> $GITHUB_ENV
55-
5657
- name: Setup Acceptance Test Matrix
5758
id: get-matrix
5859
if: ${{ github.repository_owner == 'puppetlabs' }}
5960
run: |
6061
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
61-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
62+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
6263
else
6364
echo "::set-output name=matrix::{}"
6465
fi
65-
66+
6667
- name: "Honeycomb: Record Setup Test Matrix time"
6768
if: ${{ always() }}
6869
run: |
6970
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
70-
7171
Acceptance:
7272
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
7373
needs:
@@ -187,7 +187,7 @@ jobs:
187187
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'
188188
189189
slack-workflow-status:
190-
if: always()
190+
if: ${{ github.repository_owner == 'puppetlabs' }}
191191
name: Post Workflow Status To Slack
192192
needs:
193193
- Acceptance

.github/workflows/pr_test.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: "PR Testing"
22

33
on: [pull_request]
44

5+
56
env:
7+
68
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
79
HONEYCOMB_DATASET: litmus tests
810

@@ -14,6 +16,7 @@ jobs:
1416
matrix: ${{ steps.get-matrix.outputs.matrix }}
1517

1618
steps:
19+
1720
- name: "Honeycomb: Start recording"
1821
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
1922
with:
@@ -25,7 +28,6 @@ jobs:
2528
run: |
2629
echo STEP_ID=setup-environment >> $GITHUB_ENV
2730
echo STEP_START=$(date +%s) >> $GITHUB_ENV
28-
2931
- name: Checkout Source
3032
uses: actions/checkout@v2
3133
if: ${{ github.repository_owner == 'puppetlabs' }}
@@ -43,14 +45,13 @@ jobs:
4345
echo ::group::bundler environment
4446
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
4547
echo ::endgroup::
46-
48+
4749
- name: "Honeycomb: Record Setup Environment time"
4850
if: ${{ github.repository_owner == 'puppetlabs' }}
4951
run: |
5052
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
5153
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
5254
echo STEP_START=$(date +%s) >> $GITHUB_ENV
53-
5455
- name: Run validation steps
5556
run: |
5657
bundle exec rake validate
@@ -60,16 +61,15 @@ jobs:
6061
id: get-matrix
6162
run: |
6263
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
63-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
64+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
6465
else
6566
echo "::set-output name=matrix::{}"
6667
fi
67-
68+
6869
- name: "Honeycomb: Record Setup Test Matrix time"
6970
if: ${{ always() }}
7071
run: |
7172
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
72-
7373
Acceptance:
7474
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
7575
needs:
@@ -89,7 +89,7 @@ jobs:
8989
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
9090
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
9191
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
92-
92+
9393
- name: "Honeycomb: Start recording"
9494
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
9595
with:
@@ -102,7 +102,6 @@ jobs:
102102
run: |
103103
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
104104
echo STEP_START=$(date +%s) >> $GITHUB_ENV
105-
106105
- name: Checkout Source
107106
uses: actions/checkout@v2
108107

@@ -117,14 +116,13 @@ jobs:
117116
echo ::group::bundler environment
118117
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
119118
echo ::endgroup::
120-
119+
121120
- name: "Honeycomb: Record Setup Environment time"
122121
if: ${{ always() }}
123122
run: |
124123
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
125124
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
126125
echo STEP_START=$(date +%s) >> $GITHUB_ENV
127-
128126
- name: Provision test environment
129127
run: |
130128
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
@@ -150,7 +148,7 @@ jobs:
150148
- name: Install module
151149
run: |
152150
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
153-
151+
154152
- name: "Honeycomb: Record deployment times"
155153
if: ${{ always() }}
156154
run: |
@@ -159,18 +157,16 @@ jobs:
159157
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
160158
echo STEP_START=$(date +%s) >> $GITHUB_ENV
161159
echo ::endgroup::
162-
163160
- name: Run acceptance tests
164161
run: |
165162
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
166-
163+
167164
- name: "Honeycomb: Record acceptance testing times"
168165
if: ${{ always() }}
169166
run: |
170167
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
171168
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
172169
echo STEP_START=$(date +%s) >> $GITHUB_ENV
173-
174170
- name: Remove test environment
175171
if: ${{ always() }}
176172
continue-on-error: true
@@ -182,7 +178,7 @@ jobs:
182178
echo
183179
echo ::endgroup::
184180
fi
185-
181+
186182
- name: "Honeycomb: Record removal times"
187183
if: ${{ always() }}
188184
run: |

.github/workflows/spec.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
workflow_dispatch:
77
pull_request:
88

9+
910
env:
1011
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
1112
HONEYCOMB_DATASET: litmus tests
@@ -18,6 +19,7 @@ jobs:
1819
spec_matrix: ${{ steps.get-matrix.outputs.spec_matrix }}
1920

2021
steps:
22+
2123
- name: "Honeycomb: Start recording"
2224
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
2325
with:
@@ -29,7 +31,6 @@ jobs:
2931
run: |
3032
echo STEP_ID=setup-environment >> $GITHUB_ENV
3133
echo STEP_START=$(date +%s) >> $GITHUB_ENV
32-
3334
- name: Checkout Source
3435
uses: actions/checkout@v2
3536
if: ${{ github.repository_owner == 'puppetlabs' }}
@@ -47,18 +48,16 @@ jobs:
4748
echo ::group::bundler environment
4849
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
4950
echo ::endgroup::
50-
5151
- name: "Honeycomb: Record Setup Environment time"
5252
if: ${{ github.repository_owner == 'puppetlabs' }}
5353
run: |
5454
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
5555
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
5656
echo STEP_START=$(date +%s) >> $GITHUB_ENV
57-
58-
- name: Run Static & Syntax Tests
59-
if: ${{ github.repository_owner == 'puppetlabs' }}
60-
run: |
61-
buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
57+
# - name: Run Static & Syntax Tests
58+
# if: ${{ github.repository_owner == 'puppetlabs' }}
59+
# run: |
60+
# buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
6261

6362
- name: Setup Spec Test Matrix
6463
id: get-matrix
@@ -68,12 +67,10 @@ jobs:
6867
else
6968
echo "::set-output name=spec_matrix::{}"
7069
fi
71-
7270
- name: "Honeycomb: Record Setup Test Matrix time"
7371
if: ${{ always() }}
7472
run: |
7573
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
76-
7774
Spec:
7875
name: "Spec Tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"
7976
needs:
@@ -96,7 +93,6 @@ jobs:
9693
9794
- run: |
9895
echo 'puppet_version=${{ env.SANITIZED_PUPPET_VERSION }}' >> $BUILDEVENT_FILE
99-
10096
- name: "Honeycomb: Start first step"
10197
run: |
10298
echo "STEP_ID=${{ env.SANITIZED_PUPPET_VERSION }}-spec" >> $GITHUB_ENV
@@ -109,7 +105,6 @@ jobs:
109105
dataset: ${{ env.HONEYCOMB_DATASET }}
110106
job-status: ${{ job.status }}
111107
matrix-key: ${{ env.SANITIZED_PUPPET_VERSION }}
112-
113108
- name: Checkout Source
114109
uses: actions/checkout@v2
115110

@@ -125,6 +120,7 @@ jobs:
125120
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
126121
echo ::endgroup::
127122
123+
128124
- name: Run parallel_spec tests
129125
run: |
130126
buildevents cmd $TRACE_ID $STEP_ID 'rake parallel_spec Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake parallel_spec

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require:
44
- rubocop-rspec
55
AllCops:
66
DisplayCopNames: true
7-
TargetRubyVersion: '2.4'
7+
TargetRubyVersion: '2.5'
88
Include:
99
- "**/*.rb"
1010
Exclude:

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ group :development do
2424
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
2525
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
2626
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27+
gem "voxpupuli-puppet-lint-plugins", '>= 3.0', require: false, platforms: [:ruby]
2728
gem "github_changelog_generator", require: false
2829
end
2930
group :system_tests do

0 commit comments

Comments
 (0)