Skip to content

Commit

Permalink
fix: support ConnectionResetError
Browse files Browse the repository at this point in the history
  • Loading branch information
YusufMavzer committed Dec 19, 2022
1 parent bc7dfe3 commit 1ed6f97
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion polling-action/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
2 changes: 1 addition & 1 deletion polling-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ outputs:

runs:
using: 'docker'
image: 'docker://ghcr.io/informatievlaanderen/awscurl-polling-action:1.0.0'
image: 'docker://ghcr.io/informatievlaanderen/awscurl-polling-action:1.0.1'
args:
- ${{ inputs.environment }}
- ${{ inputs.version }}
Expand Down
Empty file modified polling-action/deploy.sh
100644 → 100755
Empty file.
10 changes: 7 additions & 3 deletions polling-action/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ def main():
sendOutput("build-uuid", buildResponse['body']['BuildUuid'])
time.sleep(10)
while True:
statusResponse = getStatus(buildResponse['body']['BuildUuid'])
status = statusResponse['status']
print(f'Deployment for version {args.version} to environment {args.environment}: {status}"')
try:
statusResponse = getStatus(buildResponse['body']['BuildUuid'])
status = statusResponse['status']
print(f'Deployment for version {args.version} to environment {args.environment}: {status}"')
except:
print(f'Polling request failed. Trying again!')
continue

if status == 'SUCCEEDED':
break
Expand Down

0 comments on commit 1ed6f97

Please sign in to comment.