Skip to content

Commit fff24d3

Browse files
authored
Merge pull request #1366 from puppetlabs/pdksync_remove_puppet5
pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0
2 parents f0933c0 + b074660 commit fff24d3

File tree

8 files changed

+159
-159
lines changed

8 files changed

+159
-159
lines changed

.github/workflows/auto_release.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: "Auto release"
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * 6'
6+
workflow_dispatch:
7+
8+
env:
9+
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
10+
HONEYCOMB_DATASET: litmus tests
11+
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
13+
jobs:
14+
auto_release:
15+
name: "Automatic release prep"
16+
runs-on: ubuntu-20.04
17+
18+
steps:
19+
- name: "Honeycomb: Start recording"
20+
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
21+
with:
22+
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
23+
dataset: ${{ env.HONEYCOMB_DATASET }}
24+
job-status: ${{ job.status }}
25+
26+
- name: "Honeycomb: start first step"
27+
run: |
28+
echo STEP_ID="auto-release" >> $GITHUB_ENV
29+
echo STEP_START=$(date +%s) >> $GITHUB_ENV
30+
31+
- name: "Checkout Source"
32+
if: ${{ github.repository_owner == 'puppetlabs' }}
33+
uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 0
36+
persist-credentials: false
37+
38+
- name: "PDK Release prep"
39+
uses: docker://puppet/pdk:nightly
40+
with:
41+
args: 'release prep --force'
42+
env:
43+
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: "Get Version"
46+
if: ${{ github.repository_owner == 'puppetlabs' }}
47+
id: gv
48+
run: |
49+
echo "::set-output name=ver::$(cat metadata.json | jq .version | tr -d \")"
50+
51+
- name: "Commit changes"
52+
if: ${{ github.repository_owner == 'puppetlabs' }}
53+
run: |
54+
git config --local user.email "action@github.com"
55+
git config --local user.name "GitHub Action"
56+
git add .
57+
git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
58+
59+
- name: Create Pull Request
60+
id: cpr
61+
uses: puppetlabs/peter-evans-create-pull-request@v3
62+
if: ${{ github.repository_owner == 'puppetlabs' }}
63+
with:
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
66+
branch: "release-prep"
67+
delete-branch: true
68+
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)"
70+
labels: "maintenance"
71+
72+
- name: PR outputs
73+
if: ${{ github.repository_owner == 'puppetlabs' }}
74+
run: |
75+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
76+
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'

.github/workflows/nightly.yml

Lines changed: 25 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -17,45 +17,41 @@ jobs:
1717

1818
steps:
1919
- name: "Honeycomb: Start recording"
20-
uses: kvrhdn/gha-buildevents@5be4636b81803713c94d7cb7e3a4b85d759df112 # pin@v1.0.2
20+
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
2121
with:
2222
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
2323
dataset: ${{ env.HONEYCOMB_DATASET }}
2424
job-status: ${{ job.status }}
2525

2626
- name: "Honeycomb: Start first step"
2727
run: |
28-
echo STEP_ID=0 >> $GITHUB_ENV
28+
echo STEP_ID=setup-environment >> $GITHUB_ENV
2929
echo STEP_START=$(date +%s) >> $GITHUB_ENV
3030
3131
- name: Checkout Source
3232
uses: actions/checkout@v2
3333
if: ${{ github.repository_owner == 'puppetlabs' }}
3434

3535
- name: Activate Ruby 2.7
36-
uses: actions/setup-ruby@v1
36+
uses: ruby/setup-ruby@v1
3737
if: ${{ github.repository_owner == 'puppetlabs' }}
3838
with:
3939
ruby-version: "2.7"
40+
bundler-cache: true
4041

41-
- name: Cache gems
42-
uses: actions/cache@v2
42+
- name: Print bundle environment
4343
if: ${{ github.repository_owner == 'puppetlabs' }}
44-
with:
45-
path: vendor/gems
46-
key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
47-
restore-keys: |
48-
${{ runner.os }}-${{ github.event_name }}-
49-
${{ runner.os }}-
44+
run: |
45+
echo ::group::bundler environment
46+
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
47+
echo ::endgroup::
5048
51-
- name: Install gems
49+
- name: "Honeycomb: Record Setup Environment time"
5250
if: ${{ github.repository_owner == 'puppetlabs' }}
5351
run: |
54-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
55-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
56-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
57-
buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
58-
buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
52+
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
53+
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
54+
echo STEP_START=$(date +%s) >> $GITHUB_ENV
5955
6056
- name: Setup Acceptance Test Matrix
6157
id: get-matrix
@@ -67,7 +63,7 @@ jobs:
6763
echo "::set-output name=matrix::{}"
6864
fi
6965
70-
- name: "Honeycomb: Record setup time"
66+
- name: "Honeycomb: Record Setup Test Matrix time"
7167
if: ${{ always() }}
7268
run: |
7369
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
@@ -90,7 +86,7 @@ jobs:
9086
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
9187
9288
- name: "Honeycomb: Start recording"
93-
uses: kvrhdn/gha-buildevents@5be4636b81803713c94d7cb7e3a4b85d759df112 # pin@v1.0.2
89+
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
9490
with:
9591
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
9692
dataset: ${{ env.HONEYCOMB_DATASET }}
@@ -106,42 +102,22 @@ jobs:
106102
uses: actions/checkout@v2
107103

108104
- name: Activate Ruby 2.7
109-
uses: actions/setup-ruby@v1
105+
uses: ruby/setup-ruby@v1
110106
with:
111107
ruby-version: "2.7"
108+
bundler-cache: true
112109

113-
- name: Cache gems
114-
uses: actions/cache@v2
115-
with:
116-
path: vendor/gems
117-
key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
118-
restore-keys: |
119-
${{ runner.os }}-${{ github.event_name }}-
120-
${{ runner.os }}-
121-
122-
- name: "Honeycomb: Record cache setup time"
123-
if: ${{ always() }}
124-
run: |
125-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Cache retrieval'
126-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
127-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
128-
129-
- name: Bundler Setup
110+
- name: Print bundle environment
130111
run: |
131-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
132-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
133-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
134-
buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
135-
buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
136112
echo ::group::bundler environment
137113
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
138114
echo ::endgroup::
139115
140-
- name: "Honeycomb: Record Bundler Setup time"
116+
- name: "Honeycomb: Record Setup Environment time"
141117
if: ${{ always() }}
142118
run: |
143-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Bundler Setup'
144-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
119+
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
145121
echo STEP_START=$(date +%s) >> $GITHUB_ENV
146122
147123
- name: Provision test environment
@@ -168,7 +144,7 @@ jobs:
168144
run: |
169145
echo ::group::honeycomb step
170146
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
171-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
147+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
172148
echo STEP_START=$(date +%s) >> $GITHUB_ENV
173149
echo ::endgroup::
174150
@@ -180,11 +156,12 @@ jobs:
180156
if: ${{ always() }}
181157
run: |
182158
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
183-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-5 >> $GITHUB_ENV
159+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
184160
echo STEP_START=$(date +%s) >> $GITHUB_ENV
185161
186162
- name: Remove test environment
187163
if: ${{ always() }}
164+
continue-on-error: true
188165
run: |
189166
if [ -f inventory.yaml ]; then
190167
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
@@ -207,7 +184,7 @@ jobs:
207184
runs-on: ubuntu-20.04
208185
steps:
209186
- name: Slack Workflow Notification
210-
uses: Gamesight/slack-workflow-status@88ee95b73b4669825883ddf22747966204663e58 # pin@master
187+
uses: puppetlabs/Gamesight-slack-workflow-status@pdk-templates-v1
211188
with:
212189
# Required Input
213190
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)