Skip to content

Commit 274d43c

Browse files
authored
Merge pull request #67 from mhashizume/MODULES-11371/main/puppet-8-prep
(MODULES-11371) Updates PDK template
2 parents 05b3bc1 + ab62c7d commit 274d43c

14 files changed

+113
-55
lines changed

.devcontainer/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# devcontainer
2+
3+
4+
For format details, see https://aka.ms/devcontainer.json.
5+
6+
For config options, see the README at:
7+
https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
8+
9+
``` json
10+
{
11+
"name": "Puppet Development Kit (Community)",
12+
"dockerFile": "Dockerfile",
13+
14+
// Set *default* container specific settings.json values on container create.
15+
"settings": {
16+
"terminal.integrated.profiles.linux": {
17+
"bash": {
18+
"path": "bash",
19+
}
20+
}
21+
},
22+
23+
// Add the IDs of extensions you want installed when the container is created.
24+
"extensions": [
25+
"puppet.puppet-vscode",
26+
"rebornix.Ruby"
27+
],
28+
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
"forwardPorts": [],
31+
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
"postCreateCommand": "pdk --version",
34+
}
35+
```
36+
37+
38+

.devcontainer/devcontainer.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
31
{
42
"name": "Puppet Development Kit (Community)",
53
"dockerFile": "Dockerfile",
64

7-
// Set *default* container specific settings.json values on container create.
85
"settings": {
9-
"terminal.integrated.shell.linux": "/bin/bash"
6+
"terminal.integrated.profiles.linux": {
7+
"bash": {
8+
"path": "bash",
9+
}
10+
}
1011
},
1112

12-
// Add the IDs of extensions you want installed when the container is created.
1313
"extensions": [
1414
"puppet.puppet-vscode",
1515
"rebornix.Ruby"
1616
]
17-
18-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19-
// "forwardPorts": [],
20-
21-
// Use 'postCreateCommand' to run commands after the container is created.
22-
// "postCreateCommand": "pdk --version",
2317
}

.github/workflows/auto_release.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
runs-on: ubuntu-20.04
1515

1616
steps:
17+
1718
- name: "Honeycomb: Start recording"
1819
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
1920
with:
@@ -25,18 +26,19 @@ jobs:
2526
run: |
2627
echo STEP_ID="auto-release" >> $GITHUB_ENV
2728
echo STEP_START=$(date +%s) >> $GITHUB_ENV
28-
2929
- name: "Checkout Source"
3030
if: ${{ github.repository_owner == 'puppetlabs' }}
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v3
3232
with:
3333
fetch-depth: 0
3434
persist-credentials: false
3535

36+
# We use the dev tools image here because the PDK image does not have the
37+
# build tools necessary to compile native extensions.
3638
- name: "PDK Release prep"
37-
uses: docker://puppet/iac_release:ci
39+
uses: docker://puppet/puppet-dev-tools:4.x
3840
with:
39-
args: 'release prep --force'
41+
args: 'pdk release prep --force --debug'
4042
env:
4143
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4244

@@ -46,8 +48,14 @@ jobs:
4648
run: |
4749
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
4850
49-
- name: "Commit changes"
51+
- name: "Check if a release is necessary"
5052
if: ${{ github.repository_owner == 'puppetlabs' }}
53+
id: check
54+
run: |
55+
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
56+
57+
- name: "Commit changes"
58+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
5159
run: |
5260
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
5361
git config --local user.name "GitHub Action"
@@ -57,7 +65,7 @@ jobs:
5765
- name: Create Pull Request
5866
id: cpr
5967
uses: puppetlabs/peter-evans-create-pull-request@v3
60-
if: ${{ github.repository_owner == 'puppetlabs' }}
68+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
6169
with:
6270
token: ${{ secrets.GITHUB_TOKEN }}
6371
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
@@ -73,11 +81,11 @@ jobs:
7381
labels: "maintenance"
7482

7583
- name: PR outputs
76-
if: ${{ github.repository_owner == 'puppetlabs' }}
84+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
7785
run: |
7886
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
7987
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
80-
88+
8189
- name: "Honeycomb: Record finish step"
8290
if: ${{ always() }}
8391
run: |

.github/workflows/dispatch_unit_tests_with_nightly_puppet_gem.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ jobs:
7676

7777
strategy:
7878
matrix:
79-
os: [ 'ubuntu-18.04', 'macos-latest', 'windows-2019' ]
79+
os: [ 'ubuntu-20.04', 'macos-latest', 'windows-2019' ]
8080
include:
81-
- os: 'ubuntu-18.04'
81+
- os: 'ubuntu-20.04'
8282
os_type: 'Linux'
8383
env_set_cmd: 'export '
8484
gem_file_postfix: '.gem'
@@ -94,7 +94,7 @@ jobs:
9494
runs-on: ${{ matrix.os }}
9595
steps:
9696
- name: Checkout code
97-
uses: actions/checkout@v2
97+
uses: actions/checkout@v3
9898

9999
- name: Install ruby version ${{ env.ruby_version }}
100100
uses: ruby/setup-ruby@v1

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-20.04
1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1313
with:
1414
ref: ${{ github.ref }}
1515
clean: true
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-20.04
3434
steps:
3535
- name: Checkout code
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3737
with:
3838
ref: ${{ github.ref }}
3939
clean: true

.github/workflows/static_code_analysis.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
ruby_version: 2.6
1616
extra_checks: check:symlinks check:git_ignore check:dot_underscore check:test_file
1717

18-
runs-on: 'ubuntu-18.04'
18+
runs-on: 'ubuntu-20.04'
1919
steps:
2020
- name: Checkout current PR code
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222
with:
2323
fetch-depth: 0
2424

.github/workflows/unit_tests_with_nightly_puppet_gem.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
1313
strategy:
1414
matrix:
15-
os: [ 'ubuntu-18.04', 'macos-latest', 'windows-2019' ]
15+
os: [ 'ubuntu-20.04', 'macos-latest', 'windows-2019' ]
1616
puppet_version: [ 6, 7 ]
1717
include:
1818
- puppet_version: 6
1919
ruby: 2.5
2020
- puppet_version: 7
2121
ruby: 2.7
2222

23-
- os: 'ubuntu-18.04'
23+
- os: 'ubuntu-20.04'
2424
os_type: 'Linux'
2525
env_set_cmd: 'export '
2626
gem_file: 'puppet-latest.gem'
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ${{ matrix.os }}
3737
steps:
3838
- name: Checkout current PR code
39-
uses: actions/checkout@v2
39+
uses: actions/checkout@v3
4040

4141
- name: Install ruby version ${{ matrix.ruby }}
4242
uses: ruby/setup-ruby@v1

.github/workflows/unit_tests_with_released_puppet_gem.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
1313
strategy:
1414
matrix:
15-
os: [ 'ubuntu-18.04', 'macos-latest', 'windows-2019' ]
15+
os: [ 'ubuntu-20.04', 'macos-latest', 'windows-2019' ]
1616
puppet_version: [ 6, 7 ]
1717
include:
1818
- puppet_version: 6
1919
ruby: 2.5
2020
- puppet_version: 7
2121
ruby: 2.7
2222

23-
- os: 'ubuntu-18.04'
23+
- os: 'ubuntu-20.04'
2424
os_type: 'Linux'
2525
- os: 'macos-latest'
2626
os_type: 'macOS'
@@ -32,7 +32,7 @@ jobs:
3232
PUPPET_GEM_VERSION: ~> ${{ matrix.puppet_version }}.0
3333
steps:
3434
- name: Checkout current PR code
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@v3
3636

3737
- name: Install ruby version ${{ matrix.ruby }}
3838
uses: ruby/setup-ruby@v1

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require:
44
- rubocop-rspec
55
AllCops:
66
DisplayCopNames: true
7-
TargetRubyVersion: '2.4'
7+
TargetRubyVersion: '2.5'
88
Include:
99
- "**/*.rb"
1010
Exclude:

.sync.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Gemfile:
2929
from_env: BEAKER_PUPPET_VERSION
3030
version: '~> 1.22'
3131
- gem: github_changelog_generator
32+
version: '= 1.16.4'
33+
- gem: concurrent-ruby
34+
version: '= 1.1.10'
3235
# We can unpin async when we move to Ruby 3
3336
- gem: async
3437
version: '~> 1'

0 commit comments

Comments
 (0)