Skip to content

Commit

Permalink
fix(workflow): correct bolt task target flag and improve error message
Browse files Browse the repository at this point in the history
- Changed `-t` to `--targets` for the `bolt task run` command to ensure proper target specification.
- Enhanced the error message for compiler conversion failure to include expected and actual values.
  • Loading branch information
CoMfUcIoS committed Sep 23, 2024
1 parent d0f3642 commit 8bb404f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test-upgrade-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,17 @@ jobs:
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 \
--targets $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"
if [ "$compiler" != "$legacy_compiler" ]
then
echo "Compiler conversion failed, expected $compiler, got $legacy_compiler"
exit 1
fi
echo ::endgroup::
Expand Down

0 comments on commit 8bb404f

Please sign in to comment.