From 538bcfe9593f3ad6fa406c820dfe71d92946c5f6 Mon Sep 17 00:00:00 2001 From: Anton Belodedenko <2033996+ab77@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:23:36 -0700 Subject: [PATCH] show EC2 instance termination status change-type: patch --- .github/workflows/tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eb732ba..a37720e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -580,6 +580,12 @@ jobs: source src/balena-tests/functions + function cleanup() { + aws ec2 describe-instances --instance-ids ${{ steps.balena-sut.outputs.instance_id }} \ + | jq -r .Reservations[].Instances[].StateReason + } + trap 'cleanup' EXIT + with_backoff balena login --token '${{ secrets.BALENA_API_KEY }}' balena whoami && ssh-add -l @@ -836,6 +842,9 @@ jobs: aws logs put-retention-policy \ --log-group-name open-balena-tests \ --retention-in-days "${{ env.AWS_LOGS_RETENTION }}" || true + + aws ec2 describe-instances --instance-ids ${{ steps.ubuntu-sut.outputs.instance_id }} \ + | jq -r .Reservations[].Instances[].StateReason } trap 'log_output' EXIT