Skip to content

Commit 58fd07b

Browse files
authored
Merge pull request #217 from coreymbe/PIE-1595-token_variable
(PIE-1595) Token by Source Type
2 parents a0de0e5 + d563470 commit 58fd07b

File tree

15 files changed

+336
-159
lines changed

15 files changed

+336
-159
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
id: get-matrix
3232
if: ${{ github.repository_owner == 'puppetlabs' }}
3333
run: |
34-
bundle exec matrix_from_metadata_v2
34+
bundle exec matrix_from_metadata_v3
3535
3636
Spec:
3737
name: "Spec Tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"

.github/workflows/latest_testing.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
name: "Setup Test Matrix"
88
runs-on: ubuntu-20.04
99
outputs:
10-
matrix: ${{ steps.build-matrix.outputs.matrix }}
10+
matrix: ${{ steps.set-matrix.outputs.acc_matrix }}
1111

1212
steps:
1313
- name: Checkout Source
@@ -31,30 +31,34 @@ jobs:
3131
id: curl_forge
3232
run: |
3333
echo "forge_response=$(curl https://forge.puppet.com/private/versions/pe)" >> $GITHUB_OUTPUT
34-
- name: Set latest release
34+
- name: Set PE latest release
3535
id: latest_release
3636
run: |
37-
out=$(jq -c '[.[] | select(.lts == false)][0].latest | {"collection": [.]}' <<<'${{ steps.curl_forge.outputs.forge_response }}')
37+
out=$(jq -c '[.[] | select(.lts == false)][0].latest | {"pe_version": [.]}' <<<'${{ steps.curl_forge.outputs.forge_response }}')
3838
echo "latest=$out" >> $GITHUB_OUTPUT
39-
- name: Setup Spec Test Matrix
40-
id: set-matrix
39+
- name: Build Test Matrix
40+
id: build-matrix
4141
run: |
42-
echo "matrix={\"platforms\":[\"centos-7\",\"rhel-8\",\"rhel-9\",\"ubuntu-2004-lts\"]}" >> $GITHUB_OUTPUT
42+
bundle exec matrix_from_metadata_v3 \
43+
--provision-exclude docker \
44+
--arch-exclude arm \
45+
--platform-exclude debian \
46+
--platform-exclude sles \
47+
--platform-exclude ubuntu
4348
- name: Setup Acceptance Test Matrix
44-
id: build-matrix
49+
id: set-matrix
4550
run: |
46-
out=$(echo '${{ steps.set-matrix.outputs.matrix }}' | jq -c --argjson latest '${{ steps.latest_release.outputs.latest }}' '.collection += $latest.collection')
47-
echo "matrix=$out" >> $GITHUB_OUTPUT
51+
out=$(echo '${{ steps.build-matrix.outputs.matrix }}' | jq -c --argjson latest '${{ steps.latest_release.outputs.latest }}' '.collection = $latest.pe_version')
52+
echo "acc_matrix=$out" >> $GITHUB_OUTPUT
4853
Integration:
49-
name: "${{matrix.platforms}}, ${{matrix.collection}}"
54+
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
5055
needs:
5156
- setup_matrix
52-
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
5357

5458
runs-on: ubuntu-20.04
5559
strategy:
5660
fail-fast: false
57-
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
61+
matrix: ${{ fromJson(needs.setup_matrix.outputs.matrix) }}
5862

5963
steps:
6064
- name: Checkout Source
@@ -78,7 +82,7 @@ jobs:
7882
echo ::endgroup::
7983
- name: Provision test environment
8084
run: |
81-
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms }}'
85+
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms.image }}'
8286
echo ::group::=== REQUEST ===
8387
cat request.json || true
8488
echo

.github/workflows/lts_testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Setup Spec Test Matrix
4040
id: set-matrix
4141
run: |
42-
echo "matrix={\"platforms\":[\"centos-7\",\"rhel-8\",\"rhel-9\",\"ubuntu-2004-lts\"]}" >> $GITHUB_OUTPUT
42+
echo "matrix={\"platforms\":[\"rhel-7\",\"rhel-8\",\"rhel-9\"]}" >> $GITHUB_OUTPUT
4343
- name: Setup Acceptance Test Matrix
4444
id: build-matrix
4545
run: |

.github/workflows/nightly_testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Get Test Matrix
3131
id: get-matrix
3232
run: |
33-
bundle exec matrix_from_metadata_v2
33+
bundle exec matrix_from_metadata_v3
3434
- name: Set nightly releases
3535
id: nightly_release
3636
run: |
@@ -39,7 +39,7 @@ jobs:
3939
- name: Setup Spec Test Matrix
4040
id: set-matrix
4141
run: |
42-
echo "matrix={\"platforms\":[\"centos-7\",\"rhel-8\",\"rhel-9\",\"ubuntu-2004-lts\"]}" >> $GITHUB_OUTPUT
42+
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
4343
- name: Setup Acceptance Test Matrix
4444
id: build-matrix
4545
run: |

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,20 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
2526
.project
2627
.envrc
2728
/inventory.yaml
2829
/spec/fixtures/litmus_inventory.yaml
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log

.pdkignore

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,34 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
2526
.project
2627
.envrc
2728
/inventory.yaml
2829
/spec/fixtures/litmus_inventory.yaml
29-
/appveyor.yml
30-
/.editorconfig
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log
3136
/.fixtures.yml
3237
/Gemfile
3338
/.gitattributes
39+
/.github/
3440
/.gitignore
35-
/.gitlab-ci.yml
3641
/.pdkignore
3742
/.puppet-lint.rc
3843
/Rakefile
3944
/rakelib/
4045
/.rspec
41-
/.rubocop.yml
46+
/..yml
4247
/.yardopts
4348
/spec/
4449
/.vscode/

0 commit comments

Comments
 (0)