Skip to content

Commit 431a8df

Browse files
committed
(maint) Running a pdk update to consume latest pdk-template changes
1 parent a6101cb commit 431a8df

File tree

10 files changed

+62
-37
lines changed

10 files changed

+62
-37
lines changed

.github/workflows/auto_release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
persist-credentials: false
3737

3838
- name: "PDK Release prep"
39-
uses: docker://puppet/pdk:nightly
39+
uses: docker://puppet/iac_release:ci
4040
with:
4141
args: 'release prep --force'
4242
env:
@@ -46,12 +46,12 @@ jobs:
4646
if: ${{ github.repository_owner == 'puppetlabs' }}
4747
id: gv
4848
run: |
49-
echo "::set-output name=ver::$(cat metadata.json | jq .version | tr -d \")"
49+
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
5050
5151
- name: "Commit changes"
5252
if: ${{ github.repository_owner == 'puppetlabs' }}
5353
run: |
54-
git config --local user.email "action@github.com"
54+
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
5555
git config --local user.name "GitHub Action"
5656
git add .
5757
git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
@@ -66,7 +66,12 @@ jobs:
6666
branch: "release-prep"
6767
delete-branch: true
6868
title: "Release prep v${{ steps.gv.outputs.ver }}"
69-
body: "Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb)"
69+
body: |
70+
Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb) from commit ${{ github.sha }}.
71+
Please verify before merging:
72+
- [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green
73+
- [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests
74+
- [ ] Ensure the [changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) version and [metadata](https://github.com/${{ github.repository }}/blob/release-prep/metadata.json) version match
7075
labels: "maintenance"
7176

7277
- name: PR outputs

.github/workflows/nightly.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
if: ${{ github.repository_owner == 'puppetlabs' }}
5959
run: |
6060
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
61-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata
61+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
6262
else
6363
echo "::set-output name=matrix::{}"
6464
fi
@@ -69,6 +69,7 @@ jobs:
6969
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
7070
7171
Acceptance:
72+
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
7273
needs:
7374
- setup_matrix
7475

@@ -82,20 +83,22 @@ jobs:
8283

8384
steps:
8485
- run: |
85-
echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
86+
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
8687
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
88+
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
89+
8790
8891
- name: "Honeycomb: Start recording"
8992
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
9093
with:
9194
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
9295
dataset: ${{ env.HONEYCOMB_DATASET }}
9396
job-status: ${{ job.status }}
94-
matrix-key: ${{ matrix.platform }}-${{ matrix.collection }}
97+
matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
9598

9699
- name: "Honeycomb: start first step"
97100
run: |
98-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
101+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
99102
echo STEP_START=$(date +%s) >> $GITHUB_ENV
100103
101104
- name: Checkout Source
@@ -117,18 +120,25 @@ jobs:
117120
if: ${{ always() }}
118121
run: |
119122
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
123+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
121124
echo STEP_START=$(date +%s) >> $GITHUB_ENV
122125
123126
- name: Provision test environment
124127
run: |
125-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platform }}' -- bundle exec rake 'litmus:provision[provision::provision_service,${{ matrix.platform }}]'
128+
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
126129
echo ::group::=== REQUEST ===
127130
cat request.json || true
128131
echo
129132
echo ::endgroup::
130133
echo ::group::=== INVENTORY ===
131-
sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
134+
if [ -f 'spec/fixtures/litmus_inventory.yaml' ];
135+
then
136+
FILE='spec/fixtures/litmus_inventory.yaml'
137+
elif [ -f 'inventory.yaml' ];
138+
then
139+
FILE='inventory.yaml'
140+
fi
141+
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
132142
echo ::endgroup::
133143
134144
- name: Install agent
@@ -144,7 +154,7 @@ jobs:
144154
run: |
145155
echo ::group::honeycomb step
146156
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
147-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
157+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
148158
echo STEP_START=$(date +%s) >> $GITHUB_ENV
149159
echo ::endgroup::
150160
@@ -156,14 +166,14 @@ jobs:
156166
if: ${{ always() }}
157167
run: |
158168
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
159-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
169+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
160170
echo STEP_START=$(date +%s) >> $GITHUB_ENV
161171
162172
- name: Remove test environment
163173
if: ${{ always() }}
164174
continue-on-error: true
165175
run: |
166-
if [ -f inventory.yaml ]; then
176+
if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
167177
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
168178
echo ::group::=== REQUEST ===
169179
cat request.json || true

.github/workflows/pr_test.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
id: get-matrix
5656
run: |
5757
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
58-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata
58+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
5959
else
6060
echo "::set-output name=matrix::{}"
6161
fi
@@ -66,6 +66,7 @@ jobs:
6666
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
6767
6868
Acceptance:
69+
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
6970
needs:
7071
- setup_matrix
7172
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
@@ -80,20 +81,21 @@ jobs:
8081

8182
steps:
8283
- run: |
83-
echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
84+
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
8485
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
86+
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
8587
8688
- name: "Honeycomb: Start recording"
8789
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
8890
with:
8991
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
9092
dataset: ${{ env.HONEYCOMB_DATASET }}
9193
job-status: ${{ job.status }}
92-
matrix-key: ${{ matrix.platform }}-${{ matrix.collection }}
94+
matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
9395

9496
- name: "Honeycomb: start first step"
9597
run: |
96-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
98+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
9799
echo STEP_START=$(date +%s) >> $GITHUB_ENV
98100
99101
- name: Checkout Source
@@ -115,18 +117,25 @@ jobs:
115117
if: ${{ always() }}
116118
run: |
117119
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
118-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
120+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
119121
echo STEP_START=$(date +%s) >> $GITHUB_ENV
120122
121123
- name: Provision test environment
122124
run: |
123-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platform }}' -- bundle exec rake 'litmus:provision[provision::provision_service,${{ matrix.platform }}]'
125+
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
124126
echo ::group::=== REQUEST ===
125127
cat request.json || true
126128
echo
127129
echo ::endgroup::
128130
echo ::group::=== INVENTORY ===
129-
sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
131+
if [ -f 'spec/fixtures/litmus_inventory.yaml' ];
132+
then
133+
FILE='spec/fixtures/litmus_inventory.yaml'
134+
elif [ -f 'inventory.yaml' ];
135+
then
136+
FILE='inventory.yaml'
137+
fi
138+
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
130139
echo ::endgroup::
131140
132141
- name: Install agent
@@ -142,7 +151,7 @@ jobs:
142151
run: |
143152
echo ::group::honeycomb step
144153
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
145-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
154+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
146155
echo STEP_START=$(date +%s) >> $GITHUB_ENV
147156
echo ::endgroup::
148157
@@ -154,14 +163,14 @@ jobs:
154163
if: ${{ always() }}
155164
run: |
156165
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
157-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
166+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
158167
echo STEP_START=$(date +%s) >> $GITHUB_ENV
159168
160169
- name: Remove test environment
161170
if: ${{ always() }}
162171
continue-on-error: true
163172
run: |
164-
if [ -f inventory.yaml ]; then
173+
if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
165174
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
166175
echo ::group::=== REQUEST ===
167176
cat request.json || true

.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

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ tasks:
66

77
vscode:
88
extensions:
9-
- puppet.puppet-vscode@1.0.0:oSzfTkDf6Cmc1jOjgW33VA==
9+
- puppet.puppet-vscode@1.2.0:f5iEPbmOj6FoFTOV6q8LTg==

.pdkignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
.project
2626
.envrc
2727
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml
2829
/appveyor.yml
2930
/.fixtures.yml
3031
/Gemfile
@@ -42,3 +43,4 @@
4243
/spec/
4344
/.vscode/
4445
/.sync.yml
46+
/.devcontainer/

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
include:
3030
- before_script:
3131
- "bundle exec rake 'litmus:provision_list[travis_ub_6]'"
32+
- "bundle exec bolt command run 'apt-get install wget -y || yum install wget -y' --inventoryfile inventory.yaml --targets='localhost*'"
3233
- "bundle exec rake 'litmus:install_agent[puppet6]'"
3334
- "bundle exec rake litmus:install_module"
3435
env:
@@ -40,6 +41,7 @@ jobs:
4041
stage: acceptance
4142
- before_script:
4243
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
44+
- "bundle exec bolt command run 'apt-get install wget -y || yum install wget -y' --inventoryfile inventory.yaml --targets='localhost*'"
4345
- "bundle exec rake 'litmus:install_agent[puppet6]'"
4446
- "bundle exec rake litmus:install_module"
4547
env:
@@ -51,6 +53,7 @@ jobs:
5153
stage: acceptance
5254
- before_script:
5355
- "bundle exec rake 'litmus:provision_list[travis_el7]'"
56+
- "bundle exec bolt command run 'apt-get install wget -y || yum install wget -y' --inventoryfile inventory.yaml --targets='localhost*'"
5457
- "bundle exec rake 'litmus:install_agent[puppet6]'"
5558
- "bundle exec rake litmus:install_module"
5659
env:
@@ -62,6 +65,7 @@ jobs:
6265
stage: acceptance
6366
- before_script:
6467
- "bundle exec rake 'litmus:provision_list[travis_el8]'"
68+
- "bundle exec bolt command run 'apt-get install wget -y || yum install wget -y' --inventoryfile inventory.yaml --targets='localhost*'"
6569
- "bundle exec rake 'litmus:install_agent[puppet6]'"
6670
- "bundle exec rake litmus:install_module"
6771
env:

Gemfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ gems['puppet'] = location_for(puppet_version)
4545
gems['facter'] = location_for(facter_version) if facter_version
4646
gems['hiera'] = location_for(hiera_version) if hiera_version
4747

48-
if Gem.win_platform? && puppet_version =~ %r{^(file:///|git://)}
49-
# If we're using a Puppet gem on Windows which handles its own win32-xxx gem
50-
# dependencies (>= 3.5.0), set the maximum versions (see PUP-6445).
51-
gems['win32-dir'] = ['<= 0.4.9', require: false]
52-
gems['win32-eventlog'] = ['<= 0.6.5', require: false]
53-
gems['win32-process'] = ['<= 0.7.5', require: false]
54-
gems['win32-security'] = ['<= 0.2.5', require: false]
55-
gems['win32-service'] = ['0.8.8', require: false]
56-
end
57-
5848
gems.each do |gem_name, gem_params|
5949
gem gem_name, *gem_params
6050
end

metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@
7777
],
7878
"description": "MySQL module",
7979
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
80-
"template-ref": "heads/main-0-g44cc7ed",
81-
"pdk-version": "1.18.1"
80+
"template-ref": "heads/main-0-ge04486b",
81+
"pdk-version": "2.0.0"
8282
}

spec/spec_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# frozen_string_literal: true
22

3+
RSpec.configure do |c|
4+
c.mock_with :rspec
5+
end
6+
37
require 'puppetlabs_spec_helper/module_spec_helper'
48
require 'rspec-puppet-facts'
59

0 commit comments

Comments
 (0)