Skip to content

Commit e60af06

Browse files
authored
Merge branch 'main' into master
2 parents 7f797cc + ad646c9 commit e60af06

File tree

114 files changed

+2748
-1831
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2748
-1831
lines changed

.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: 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: 11 additions & 5 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
@@ -46,8 +46,14 @@ jobs:
4646
run: |
4747
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
4848
49-
- name: "Commit changes"
49+
- name: "Check if a release is necessary"
5050
if: ${{ github.repository_owner == 'puppetlabs' }}
51+
id: check
52+
run: |
53+
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
54+
55+
- name: "Commit changes"
56+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
5157
run: |
5258
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
5359
git config --local user.name "GitHub Action"
@@ -57,7 +63,7 @@ jobs:
5763
- name: Create Pull Request
5864
id: cpr
5965
uses: puppetlabs/peter-evans-create-pull-request@v3
60-
if: ${{ github.repository_owner == 'puppetlabs' }}
66+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
6167
with:
6268
token: ${{ secrets.GITHUB_TOKEN }}
6369
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
@@ -73,11 +79,11 @@ jobs:
7379
labels: "maintenance"
7480

7581
- name: PR outputs
76-
if: ${{ github.repository_owner == 'puppetlabs' }}
82+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
7783
run: |
7884
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
7985
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
80-
86+
8187
- name: "Honeycomb: Record finish step"
8288
if: ${{ always() }}
8389
run: |

.github/workflows/labeller.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: community-labeller
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
pull_request_target:
8+
types:
9+
- opened
10+
11+
jobs:
12+
label:
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- uses: puppetlabs/community-labeller@v0
17+
name: Label issues or pull requests
18+
with:
19+
label_name: community
20+
label_color: '5319e7'
21+
org_membership: puppetlabs
22+
token: ${{ secrets.IAC_COMMUNITY_LABELER }}

.github/workflows/nightly.yml

Lines changed: 8 additions & 8 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
@@ -200,5 +200,5 @@ jobs:
200200
repo_token: ${{ secrets.GITHUB_TOKEN }}
201201
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
202202
# Optional Input
203-
channel: '#team-ia-bots'
203+
channel: '#team-cat-bots'
204204
name: 'GABot'

.github/workflows/pr_test.yml

Lines changed: 15 additions & 14 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,28 +45,31 @@ 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
55+
- name: Run validation steps
56+
run: |
57+
bundle exec rake validate
58+
if: ${{ github.repository_owner == 'puppetlabs' }}
5359

5460
- name: Setup Acceptance Test Matrix
5561
id: get-matrix
5662
run: |
5763
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
58-
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
5965
else
6066
echo "::set-output name=matrix::{}"
6167
fi
62-
68+
6369
- name: "Honeycomb: Record Setup Test Matrix time"
6470
if: ${{ always() }}
6571
run: |
6672
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
67-
6873
Acceptance:
6974
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
7075
needs:
@@ -84,7 +89,7 @@ jobs:
8489
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
8590
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
8691
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
87-
92+
8893
- name: "Honeycomb: Start recording"
8994
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
9095
with:
@@ -97,7 +102,6 @@ jobs:
97102
run: |
98103
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
99104
echo STEP_START=$(date +%s) >> $GITHUB_ENV
100-
101105
- name: Checkout Source
102106
uses: actions/checkout@v2
103107

@@ -112,14 +116,13 @@ jobs:
112116
echo ::group::bundler environment
113117
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
114118
echo ::endgroup::
115-
119+
116120
- name: "Honeycomb: Record Setup Environment time"
117121
if: ${{ always() }}
118122
run: |
119123
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120124
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
121125
echo STEP_START=$(date +%s) >> $GITHUB_ENV
122-
123126
- name: Provision test environment
124127
run: |
125128
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
@@ -145,7 +148,7 @@ jobs:
145148
- name: Install module
146149
run: |
147150
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
148-
151+
149152
- name: "Honeycomb: Record deployment times"
150153
if: ${{ always() }}
151154
run: |
@@ -154,18 +157,16 @@ jobs:
154157
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
155158
echo STEP_START=$(date +%s) >> $GITHUB_ENV
156159
echo ::endgroup::
157-
158160
- name: Run acceptance tests
159161
run: |
160162
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
161-
163+
162164
- name: "Honeycomb: Record acceptance testing times"
163165
if: ${{ always() }}
164166
run: |
165167
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
166168
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
167169
echo STEP_START=$(date +%s) >> $GITHUB_ENV
168-
169170
- name: Remove test environment
170171
if: ${{ always() }}
171172
continue-on-error: true
@@ -177,7 +178,7 @@ jobs:
177178
echo
178179
echo ::endgroup::
179180
fi
180-
181+
181182
- name: "Honeycomb: Record removal times"
182183
if: ${{ always() }}
183184
run: |

0 commit comments

Comments
 (0)