Skip to content

Commit

Permalink
(PIE-1595) Testing Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
coreymbe committed Oct 21, 2024
1 parent 7d66010 commit 7addefa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/latest_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: "Setup Test Matrix"
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
matrix: ${{ steps.set-matrix.outputs.acc_matrix }}

steps:
- name: Checkout Source
Expand All @@ -34,19 +34,19 @@ jobs:
- name: Set latest release
id: latest_release
run: |
out=$(jq -c '[.[] | select(.lts == false)][0].latest | {"collection": [.]}' <<<'${{ steps.curl_forge.outputs.forge_response }}')
out=$(jq -c '[.[] | select(.lts == false)][0].latest | {"pe_version": [.]}' <<<'${{ steps.curl_forge.outputs.forge_response }}')
echo "latest=$out" >> $GITHUB_OUTPUT
- name: Setup Spec Test Matrix
id: set-matrix
- name: Build Test Matrix
id: build-matrix
run: |
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"sles-15\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
bundle exec matrix_from_metadata_v3 --provision-exclude docker --arch-exclude arm --platform-exclude debian --platform-exclude sles
- name: Setup Acceptance Test Matrix
id: build-matrix
id: set-matrix
run: |
out=$(echo '${{ steps.set-matrix.outputs.matrix }}' | jq -c --argjson latest '${{ steps.latest_release.outputs.latest }}' '.collection += $latest.collection')
echo "matrix=$out" >> $GITHUB_OUTPUT
out=$(echo '${{ steps.build-matrix.outputs.matrix }}' | jq -c --argjson latest '${{ steps.latest_release.outputs.latest }}' '.pe_version += $latest.pe_version')
echo "acc_matrix=$out" >> $GITHUB_OUTPUT
Integration:
name: "${{matrix.platforms}}, ${{matrix.collection}}"
name: "${{matrix.platforms.label}}, ${{matrix.pe_version}}"
needs:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
echo ::endgroup::
- name: Provision test environment
run: |
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms }}'
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms.image }}'
echo ::group::=== REQUEST ===
cat request.json || true
echo
Expand All @@ -96,7 +96,7 @@ jobs:
echo INVENTORY_PATH=$FILE >> $GITHUB_ENV
- name: Install server
run: |
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::server_setup puppet_version='${{ matrix.collection }}' -i ./$INVENTORY_PATH --stream
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::server_setup puppet_version='${{ matrix.pe_version }}' -i ./$INVENTORY_PATH --stream
- name: Install module
run: |
bundle exec rake 'litmus:install_module'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lts_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Setup Spec Test Matrix
id: set-matrix
run: |
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"sles-15\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"sles-15\",\"ubuntu-2004-lts\"]}" >> $GITHUB_OUTPUT
- name: Setup Acceptance Test Matrix
id: build-matrix
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nightly_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- name: Get Test Matrix
id: get-matrix
run: |
bundle exec matrix_from_metadata_v3 --provision-include provision_service --output stdout
bundle exec matrix_from_metadata_v3
- name: Set nightly releases
id: nightly_release
Expand All @@ -40,7 +39,7 @@ jobs:
- name: Setup Spec Test Matrix
id: set-matrix
run: |
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"sles-15\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
- name: Setup Acceptance Test Matrix
id: build-matrix
run: |
Expand Down
1 change: 1 addition & 0 deletions plans/acceptance/pe_server_setup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
)

$cmd = @("CMD")
df -h
echo 'puppetlabsPi3!' | puppet access login -l 1y --username admin
puppet infrastructure tune | sed "s,\\x1B\\[[0-9;]*[a-zA-Z],,g" > /etc/puppetlabs/code/environments/production/data/common.yaml
puppet agent -t
Expand Down

0 comments on commit 7addefa

Please sign in to comment.