Skip to content

Commit

Permalink
feat(workflow): add grouped logging for inventory and peadm config
Browse files Browse the repository at this point in the history
- Added grouped logging for inventory and peadm config retrieval steps.
- Redacted password in inventory file for security.
- Displayed peadm_config.json content for debugging.
- Added grouped logging for smoke test step.
  • Loading branch information
CoMfUcIoS committed Sep 23, 2024
1 parent 990997b commit d0f3642
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test-upgrade-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,26 @@ jobs:
- name: Check if compiler is converted
timeout-minutes: 120
run: |
echo ::group::inventory
sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true
echo ::endgroup::
echo ::group::get_peadm_config
primary=$(yq '.groups[].targets[] | select(.vars.role == "primary") | .name' spec/fixtures/litmus_inventory.yaml)
compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1)
bundle exec bolt task run peadm::get_peadm_config \
-t $primary \
--modulepath spec/fixtures/modules \
--no-host-key-check \
--format json > peadm_config.json
cat peadm_config.json
echo ::endgroup::
echo ::group::smoke_test
legacy_compiler=$(yq '.items[0].value.params.legacy_compilers[0]' peadm_config.json)
if [ "$compiler" != "$legacy_compiler" ]; then
echo "Compiler conversion failed"
exit 1
fi
echo ::endgroup::
- name: Tear down test cluster
if: ${{ always() }}
continue-on-error: true
Expand Down

0 comments on commit d0f3642

Please sign in to comment.