Skip to content

Commit

Permalink
Print deployment URL on success execution
Browse files Browse the repository at this point in the history
This allow to see deployment details in Kuraka system
  • Loading branch information
erickgnavar committed Jul 18, 2024
1 parent ac93e14 commit 7073cce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ def main():
try:
with urlopen(request) as response:
if response.status == 201:
uid = response.read().decode().strip()
deployment_url = uri.geturl().replace(uri.path, f"/deployments/{uid}")
sys.stdout.write(
f"Deployment created with uid: {response.read().decode()}\n"
f"Deployment created with uid: {uid}, your can see its details in {deployment_url}\n"
)
except HTTPError as error:
sys.stderr.write(f"HTTP Error: {error.reason} {error.read().decode()}")
Expand Down

0 comments on commit 7073cce

Please sign in to comment.