Skip to content

Commit c2e48a6

Browse files
committed
(PIE-1661) Update action runners to ubuntu-latest
1 parent d7a0973 commit c2e48a6

File tree

8 files changed

+46
-45
lines changed

8 files changed

+46
-45
lines changed

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55
jobs:
66
setup_matrix:
77
name: "Setup Test Matrix"
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99
outputs:
1010
spec_matrix: ${{ steps.get-matrix.outputs.spec_matrix }}
1111

@@ -14,11 +14,11 @@ jobs:
1414
uses: actions/checkout@v4
1515
if: ${{ github.repository_owner == 'puppetlabs' }}
1616

17-
- name: Activate Ruby 2.7
17+
- name: Activate Ruby 3.1
1818
uses: ruby/setup-ruby@v1
1919
if: ${{ github.repository_owner == 'puppetlabs' }}
2020
with:
21-
ruby-version: "2.7"
21+
ruby-version: "3.1"
2222
bundler-cache: true
2323

2424
- name: Print bundle environment
@@ -39,7 +39,7 @@ jobs:
3939
- setup_matrix
4040
if: ${{ needs.setup_matrix.outputs.spec_matrix != '{}' }}
4141

42-
runs-on: ubuntu-20.04
42+
runs-on: ubuntu-latest
4343
strategy:
4444
fail-fast: false
4545
matrix: ${{fromJson(needs.setup_matrix.outputs.spec_matrix)}}

.github/workflows/latest_testing.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [pull_request]
55
jobs:
66
setup_matrix:
77
name: "Setup Test Matrix"
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99
outputs:
1010
matrix: ${{ steps.set-matrix.outputs.acc_matrix }}
1111

@@ -14,11 +14,11 @@ jobs:
1414
uses: actions/checkout@v4
1515
if: ${{ github.repository_owner == 'puppetlabs' }}
1616

17-
- name: Activate Ruby 2.7
17+
- name: Activate Ruby 3.1
1818
uses: ruby/setup-ruby@v1
1919
if: ${{ github.repository_owner == 'puppetlabs' }}
2020
with:
21-
ruby-version: "2.7"
21+
ruby-version: "3.1"
2222
bundler-cache: true
2323

2424
- name: Print bundle environment
@@ -43,6 +43,7 @@ jobs:
4343
--provision-exclude docker \
4444
--arch-exclude arm \
4545
--platform-exclude debian \
46+
--platform-exclude redhat-8 \
4647
--platform-exclude sles \
4748
--platform-exclude ubuntu
4849
- name: Setup Acceptance Test Matrix
@@ -55,7 +56,7 @@ jobs:
5556
needs:
5657
- setup_matrix
5758

58-
runs-on: ubuntu-20.04
59+
runs-on: ubuntu-latest
5960
strategy:
6061
fail-fast: false
6162
matrix: ${{ fromJson(needs.setup_matrix.outputs.matrix) }}
@@ -64,10 +65,10 @@ jobs:
6465
- name: Checkout Source
6566
uses: actions/checkout@v4
6667

67-
- name: Activate Ruby 2.7
68+
- name: Activate Ruby 3.1
6869
uses: ruby/setup-ruby@v1
6970
with:
70-
ruby-version: "2.7"
71+
ruby-version: "3.1"
7172
bundler-cache: true
7273

7374
- name: Print bundle environment

.github/workflows/lts_testing.yml

+21-24
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [pull_request]
55
jobs:
66
setup_matrix:
77
name: "Setup Test Matrix"
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99
outputs:
1010
matrix: ${{ steps.build-matrix.outputs.matrix }}
1111

@@ -14,11 +14,11 @@ jobs:
1414
uses: actions/checkout@v4
1515
if: ${{ github.repository_owner == 'puppetlabs' }}
1616

17-
- name: Activate Ruby 2.7
17+
- name: Activate Ruby 3.1
1818
uses: ruby/setup-ruby@v1
1919
if: ${{ github.repository_owner == 'puppetlabs' }}
2020
with:
21-
ruby-version: "2.7"
21+
ruby-version: "3.1"
2222
bundler-cache: true
2323

2424
- name: Print bundle environment
@@ -27,31 +27,28 @@ jobs:
2727
echo ::group::bundler environment
2828
bundle env
2929
echo ::endgroup::
30-
- name: Curl Forge for PE versions
31-
id: curl_forge
32-
run: |
33-
echo "forge_response=$(curl https://forge.puppet.com/private/versions/pe)" >> $GITHUB_OUTPUT
34-
- name: Set LTS release
35-
id: lts_release
36-
run: |
37-
out=$(jq -c '[.[] | select(.lts == true)][0].latest | {"collection": [.]}' <<<'${{ steps.curl_forge.outputs.forge_response }}')
38-
echo "lts=$out" >> $GITHUB_OUTPUT
39-
- name: Setup Spec Test Matrix
40-
id: set-matrix
41-
run: |
42-
echo "matrix={\"platforms\":[\"rhel-7\",\"rhel-8\",\"rhel-9\"]}" >> $GITHUB_OUTPUT
43-
- name: Setup Acceptance Test Matrix
30+
31+
- name: Build Test Matrix
4432
id: build-matrix
4533
run: |
46-
out=$(echo '${{ steps.set-matrix.outputs.matrix }}' | jq -c --argjson lts '${{ steps.lts_release.outputs.lts }}' '.collection += $lts.collection')
47-
echo "matrix=$out" >> $GITHUB_OUTPUT
34+
bundle exec matrix_from_metadata_v3 \
35+
--provision-exclude docker \
36+
--arch-exclude arm \
37+
--platform-exclude debian \
38+
--platform-exclude redhat-8 \
39+
--platform-exclude sles \
40+
--platform-exclude ubuntu \
41+
--puppet-exclude 7 \
42+
--puppet-exclude 8 \
43+
--pe-include
44+
4845
Integration:
49-
name: "${{matrix.platforms}}, ${{matrix.collection}}"
46+
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
5047
needs:
5148
- setup_matrix
5249
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
5350

54-
runs-on: ubuntu-20.04
51+
runs-on: ubuntu-latest
5552
strategy:
5653
fail-fast: false
5754
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
@@ -60,10 +57,10 @@ jobs:
6057
- name: Checkout Source
6158
uses: actions/checkout@v4
6259

63-
- name: Activate Ruby 2.7
60+
- name: Activate Ruby 3.1
6461
uses: ruby/setup-ruby@v1
6562
with:
66-
ruby-version: "2.7"
63+
ruby-version: "3.1"
6764
bundler-cache: true
6865

6966
- name: Print bundle environment
@@ -78,7 +75,7 @@ jobs:
7875
echo ::endgroup::
7976
- name: Provision test environment
8077
run: |
81-
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms }}'
78+
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms.image }}'
8279
echo ::group::=== REQUEST ===
8380
cat request.json || true
8481
echo

.github/workflows/nightly_testing.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [pull_request]
55
jobs:
66
setup_matrix:
77
name: "Setup Test Matrix"
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99
outputs:
1010
matrix: ${{ steps.build-matrix.outputs.matrix }}
1111

@@ -14,11 +14,11 @@ jobs:
1414
uses: actions/checkout@v4
1515
if: ${{ github.repository_owner == 'puppetlabs' }}
1616

17-
- name: Activate Ruby 2.7
17+
- name: Activate Ruby 3.1
1818
uses: ruby/setup-ruby@v1
1919
if: ${{ github.repository_owner == 'puppetlabs' }}
2020
with:
21-
ruby-version: "2.7"
21+
ruby-version: "3.1"
2222
bundler-cache: true
2323

2424
- name: Print bundle environment
@@ -39,7 +39,7 @@ jobs:
3939
- name: Setup Spec Test Matrix
4040
id: set-matrix
4141
run: |
42-
echo "matrix={\"platforms\":[\"rhel-7\",\"rhel-8\",\"rhel-9\"]}" >> $GITHUB_OUTPUT
42+
echo "matrix={\"platforms\":[\"rhel-7\",\"rhel-9\"]}" >> $GITHUB_OUTPUT
4343
- name: Setup Acceptance Test Matrix
4444
id: build-matrix
4545
run: |
@@ -51,7 +51,7 @@ jobs:
5151
- setup_matrix
5252
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
5353

54-
runs-on: ubuntu-20.04
54+
runs-on: ubuntu-latest
5555
strategy:
5656
fail-fast: false
5757
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
@@ -60,10 +60,10 @@ jobs:
6060
- name: Checkout Source
6161
uses: actions/checkout@v4
6262

63-
- name: Activate Ruby 2.7
63+
- name: Activate Ruby 3.1
6464
uses: ruby/setup-ruby@v1
6565
with:
66-
ruby-version: "2.7"
66+
ruby-version: "3.1"
6767
bundler-cache: true
6868

6969
- name: Print bundle environment

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
deploy-forge:
1010
name: Deploy to Forge
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v2

.github/workflows/release_prep.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Ruby
1818
uses: ruby/setup-ruby@v1
1919
with:
20-
ruby-version: 2.7
20+
ruby-version: 3.1
2121

2222
- name: Update Rubygems
2323
run: gem update --system 3.1.0

plans/acceptance/pe_server_setup.pp

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@
2121
#identify pe server node
2222
$puppet_server = get_targets('*').filter |$n| { $n.vars['role'] == 'server' }
2323

24+
# extract pe version from matrix_from_metadata_v3 output
25+
$pe_version = regsubst($version, '-puppet_enterprise', '')
26+
2427
# install pe server
2528
run_plan(
2629
'deploy_pe::provision_master',
2730
$puppet_server,
28-
'version' => $version,
31+
'version' => $pe_version,
2932
'pe_settings' => $pe_settings
3033
)
3134

plans/acceptance/server_setup.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
$localhost = get_targets('localhost')
1616
run_command('sleep 15', $localhost)
1717

18-
if $puppet_version =~ /puppet/ {
18+
if $puppet_version =~ /puppet-/ {
1919
run_plan(
2020
'splunk_hec::acceptance::oss_server_setup',
2121
'collection' => $puppet_version

0 commit comments

Comments
 (0)