Skip to content

Commit 97a7184

Browse files
authored
Merge pull request #148 from puppetlabs/pdksync_remove_puppet5
pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0
2 parents ad3f726 + c22b619 commit 97a7184

File tree

6 files changed

+91
-15
lines changed

6 files changed

+91
-15
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'

.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:

.sync.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ spec/spec_helper.rb:
4848
.github/workflows/pr_test.yml:
4949
unmanaged: true
5050
delete: true
51+
.github/workflows/auto_release.yml:
52+
unmanaged: false

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ jobs:
3030
-
3131
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
3232
stage: static
33-
-
34-
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
35-
rvm: 2.4.5
36-
stage: spec
3733
-
3834
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
3935
rvm: 2.5.7

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
"requirements": [
3737
{
3838
"name": "puppet",
39-
"version_requirement": ">= 5.5.10 < 7.0.0"
39+
"version_requirement": ">= 6.0.0 < 7.0.0"
4040
}
4141
],
42-
"pdk-version": "1.19.0.pre (47)",
42+
"pdk-version": "1.18.1",
4343
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
44-
"template-ref": "heads/main-0-g1862b96"
44+
"template-ref": "heads/main-0-g44cc7ed"
4545
}

0 commit comments

Comments
 (0)