Skip to content

Commit 2fb8746

Browse files
author
Daniel Carabas
committed
pdk update
1 parent 315558d commit 2fb8746

File tree

4 files changed

+31
-64
lines changed

4 files changed

+31
-64
lines changed

.github/workflows/auto_release.yml

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

88
env:
9-
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
9+
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
1010
HONEYCOMB_DATASET: litmus tests
1111
SERVICE_URL: https://facade-main-6f3kfepqcq-ew.a.run.app/v1/provision
1212
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: "Honeycomb: Start recording"
21-
uses: kvrhdn/gha-buildevents@5be4636b81803713c94d7cb7e3a4b85d759df112 # pin@v1.0.2
21+
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
2222
with:
2323
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
2424
dataset: ${{ env.HONEYCOMB_DATASET }}
@@ -30,83 +30,53 @@ jobs:
3030
echo STEP_START=$(date +%s) >> $GITHUB_ENV
3131
3232
- name: "Checkout Source"
33+
if: ${{ github.repository_owner == 'puppetlabs' }}
3334
uses: actions/checkout@v2
3435
with:
3536
fetch-depth: 0
3637
persist-credentials: false
3738

38-
- name: Activate Ruby 2.6
39-
uses: actions/setup-ruby@v1
40-
with:
41-
ruby-version: "2.6"
42-
43-
- name: Cache gems
44-
uses: actions/cache@v2
39+
- name: "PDK Release prep"
40+
uses: docker://puppet/pdk:nightly
4541
with:
46-
path: vendor/gems
47-
key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
48-
restore-keys: |
49-
${{ runner.os }}-${{ github.event_name }}-
50-
${{ runner.os }}-
51-
52-
- name: "Honeycomb: Record cache setup time"
53-
if: ${{ always() }}
54-
run: |
55-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Cache retrieval'
56-
echo STEP_ID="auto_release" >> $GITHUB_ENV
57-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
42+
args: 'release prep --force'
43+
env:
44+
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5845

59-
- name: Append PDK to Gemfile
60-
run: |
61-
echo "gem 'pdk'" >> Gemfile
62-
63-
- name: Bundler Setup
64-
run: |
65-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
66-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config bin vendor/bins' -- bundle config bin vendor/bins
67-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
68-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
69-
buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
70-
buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
71-
echo ::group::bundler environment
72-
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
73-
echo ::endgroup::
74-
75-
- name: "Honeycomb: Record Bundler Setup time"
76-
if: ${{ always() }}
77-
run: |
78-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Bundler Setup'
79-
echo STEP_ID="auto_release" >> $GITHUB_ENV
80-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
81-
82-
- name: "PDK Release prep"
46+
- name: "Get Version"
47+
if: ${{ github.repository_owner == 'puppetlabs' }}
48+
id: gv
8349
run: |
84-
buildevents cmd $TRACE_ID $STEP_ID 'pdk release prep' -- ./vendor/bins/pdk release prep --force
50+
echo "::set-output name=ver::$(cat metadata.json | jq .version | tr -d \")"
8551
8652
- name: "Commit changes"
53+
if: ${{ github.repository_owner == 'puppetlabs' }}
8754
run: |
8855
git config --local user.email "action@github.com"
8956
git config --local user.name "GitHub Action"
9057
git add .
91-
git commit -m "Auto-Release prep"
92-
93-
- name: "Get Version"
94-
id: gv
95-
run: |
96-
echo "::set-output name=ver::$(cat metadata.json | jq .version)"
58+
git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
9759
9860
- name: Create Pull Request
9961
id: cpr
10062
uses: puppetlabs/peter-evans-create-pull-request@v3
63+
if: ${{ github.repository_owner == 'puppetlabs' }}
10164
with:
10265
token: ${{ secrets.GITHUB_TOKEN }}
103-
commit-message: "Auto-release prep"
66+
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
10467
branch: "release-prep"
10568
delete-branch: true
106-
title: "Auto-release prep ${{ steps.gv.outputs.ver }}"
69+
title: "Release prep v${{ steps.gv.outputs.ver }}"
70+
body: "Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb)"
10771
labels: "maintenance"
10872

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

.rubocop.yml

Lines changed: 5 additions & 0 deletions
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:

appveyor.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ environment:
2121
-
2222
RUBY_VERSION: 25-x64
2323
CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
24-
-
25-
PUPPET_GEM_VERSION: ~> 5.0
26-
RUBY_VERSION: 24
27-
CHECK: parallel_spec
28-
-
29-
PUPPET_GEM_VERSION: ~> 5.0
30-
RUBY_VERSION: 24-x64
31-
CHECK: parallel_spec
3224
-
3325
PUPPET_GEM_VERSION: ~> 6.0
3426
RUBY_VERSION: 25

metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,6 @@
9999
],
100100
"description": "This module simply manages /etc/motd or the Windows Logon Message as a template, showing interpolation of system attributes",
101101
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
102-
"template-ref": "heads/main-0-g1862b96",
103-
"pdk-version": "1.19.0.pre (47)"
102+
"template-ref": "heads/main-0-g44cc7ed",
103+
"pdk-version": "1.18.1"
104104
}

0 commit comments

Comments
 (0)