Skip to content

Commit 459f190

Browse files
Always display make output
1 parent cf6b9af commit 459f190

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,5 @@ endif
4141
ansible: guard-cmd
4242
@account=$(account) poetry run make --no-print-directory -C ansible $(cmd)
4343

44-
4544
remove-stale-locks:
4645
@poetry run python ./scripts/terraform_force_unlock.py

azure/components/cleanup-ecs-pr-proxies-job.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,20 @@ steps:
1111
- bash: |
1212
make remove-stale-locks
1313
export retain_hours=72
14-
ANSIBLE_FORCE_COLOR=yes make -C ansible remove-old-ecs-pr-deploys > /tmp/err.txt
14+
ANSIBLE_FORCE_COLOR=yes make -C ansible remove-old-ecs-pr-deploys | tee /tmp/output.txt
1515
ERROR_CODE=$?
1616
ROLE_TIMEOUT_MSG="The AWS assume role session token is due to expire"
17-
if grep -q "$ROLE_TIMEOUT_MSG" /tmp/err.txt ; then
17+
if grep -q "$ROLE_TIMEOUT_MSG" /tmp/output.txt ; then
1818
echo "stderr for ansible has the error \"$ROLE_TIMEOUT_MSG\""
1919
echo "Re-assuming role and re-running step"
2020
echo "##vso[task.setvariable variable=has_aws_role_timedout;]true"
2121
2222
elif [ $ERROR_CODE -ne 0 ] ; then
23-
echo "ansible has unhandled error, re-raising"
24-
>&2 cat /tmp/err.txt
23+
echo "\n\nansible has unhandled error, re-raising"
2524
exit -1
2625
else
2726
echo "##vso[task.setvariable variable=has_aws_role_timedout;]false"
2827
fi
29-
cat /tmp/err.txt
3028
3129
displayName: "cleanup older pr deploys"
3230
condition: or(eq( ${{ parameters.retry }}, '0'), eq(variables['has_aws_role_timedout'], 'true'))

scripts/terraform_force_unlock.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
44
Warning this script should be used with care.
55
6+
This script has to be used because sometimes the ecs pr pipeline cleanup won't always properly release the lock when
7+
it fails.
8+
69
CLI arguments:
710
--min-age-hr
811
--key-prefix

0 commit comments

Comments
 (0)