Skip to content

Commit ffb7669

Browse files
author
Daniel Carabas
committed
pdk update
1 parent 27fc4f8 commit ffb7669

File tree

3 files changed

+21
-34
lines changed

3 files changed

+21
-34
lines changed

.github/workflows/auto_release.yml

+15-33
Original file line numberDiff line numberDiff line change
@@ -35,50 +35,26 @@ jobs:
3535
fetch-depth: 0
3636
persist-credentials: false
3737

38-
- name: Append PDK to Gemfile
39-
if: ${{ github.repository_owner == 'puppetlabs' }}
40-
run: |
41-
echo "gem 'pdk'" >> Gemfile
42-
43-
- name: Activate Ruby 2.7
44-
uses: ruby/setup-ruby@v1
45-
if: ${{ github.repository_owner == 'puppetlabs' }}
38+
- name: "PDK Release prep"
39+
uses: docker://puppet/pdk:nightly
4640
with:
47-
ruby-version: "2.7"
48-
bundler-cache: true
49-
50-
- name: Print bundle environment
51-
if: ${{ github.repository_owner == 'puppetlabs' }}
52-
run: |
53-
echo ::group::bundler environment
54-
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
55-
echo ::endgroup::
56-
57-
- name: "Honeycomb: Record Bundler Setup time"
58-
if: ${{ github.repository_owner == 'puppetlabs' }}
59-
run: |
60-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Bundler Setup'
61-
echo STEP_ID="auto_release_setup" >> $GITHUB_ENV
62-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
41+
args: 'release prep --force'
42+
env:
43+
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6344

64-
- name: "PDK Release prep"
45+
- name: "Get Version"
6546
if: ${{ github.repository_owner == 'puppetlabs' }}
47+
id: gv
6648
run: |
67-
buildevents cmd $TRACE_ID $STEP_ID 'pdk release prep' -- bundle exec pdk release prep --force
49+
echo "::set-output name=ver::$(cat metadata.json | jq .version | tr -d \")"
6850
6951
- name: "Commit changes"
7052
if: ${{ github.repository_owner == 'puppetlabs' }}
7153
run: |
7254
git config --local user.email "[email protected]"
7355
git config --local user.name "GitHub Action"
7456
git add .
75-
git commit -m "Auto-Release prep"
76-
77-
- name: "Get Version"
78-
if: ${{ github.repository_owner == 'puppetlabs' }}
79-
id: gv
80-
run: |
81-
echo "::set-output name=ver::$(cat metadata.json | jq .version)"
57+
git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
8258
8359
- name: Create Pull Request
8460
id: cpr
@@ -90,10 +66,16 @@ jobs:
9066
branch: "release-prep"
9167
delete-branch: true
9268
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)"
9370
labels: "maintenance"
9471

9572
- name: PR outputs
9673
if: ${{ github.repository_owner == 'puppetlabs' }}
9774
run: |
9875
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
9976
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
77+
78+
- name: "Honeycomb: Record finish step"
79+
if: ${{ always() }}
80+
run: |
81+
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow'

.rubocop.yml

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ RSpec/BeforeAfterAll:
2929
RSpec/HookArgument:
3030
Description: Prefer explicit :each argument, matching existing module's style
3131
EnforcedStyle: each
32+
RSpec/DescribeSymbol:
33+
Exclude:
34+
- spec/unit/facter/**/*.rb
3235
Style/BlockDelimiters:
3336
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
3437
be consistent then.
@@ -404,6 +407,8 @@ Style/ExponentialNotation:
404407
Enabled: false
405408
Style/FloatDivision:
406409
Enabled: false
410+
Style/FrozenStringLiteralComment:
411+
Enabled: false
407412
Style/GlobalStdStream:
408413
Enabled: false
409414
Style/HashAsLastArrayItem:

metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@
8989
],
9090
"pdk-version": "1.18.1",
9191
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
92-
"template-ref": "heads/main-0-gec9c129"
92+
"template-ref": "heads/main-0-g44cc7ed"
9393
}

0 commit comments

Comments
 (0)