Merge pull request #260 from balena-io/ab77/operational

show EC2 instance termination status
This commit is contained in:
Anton Belodedenko 2024-06-25 11:26:31 -07:00 committed by GitHub
commit b11566ea60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -580,6 +580,12 @@ jobs:
source src/balena-tests/functions 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 }}' with_backoff balena login --token '${{ secrets.BALENA_API_KEY }}'
balena whoami && ssh-add -l balena whoami && ssh-add -l
@ -836,6 +842,9 @@ jobs:
aws logs put-retention-policy \ aws logs put-retention-policy \
--log-group-name open-balena-tests \ --log-group-name open-balena-tests \
--retention-in-days "${{ env.AWS_LOGS_RETENTION }}" || true --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 trap 'log_output' EXIT