Skip to content

Commit

Permalink
update runtime.py used in action.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Falourd <guillaume.falourd@zup.com.br>
  • Loading branch information
GuillaumeFalourd committed Sep 29, 2023
1 parent 9c8dca9 commit d7f6cef
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
manifesto_dict = yaml.safe_load(manifesto_yaml)

if VERBOSE is not None:
print("MANIFESTO", manifesto_dict)
print("MANIFESTO:", manifesto_dict)

manifestoType = manifesto_dict["kind"]
appOrInfraId= manifesto_dict["spec"]["id"]
Expand Down Expand Up @@ -76,7 +76,7 @@
request_data = json.dumps(merged_dict)

if VERBOSE is not None:
print("Deploy Request Data", request_data)
print("DEPLOY RUN REQUEST DATA:", request_data)

deploy_headers = {"Authorization": f"Bearer {access_token}"}

Expand All @@ -102,9 +102,9 @@
tasks = d2["tasks"]

if VERBOSE is not None:
print("RunId:", runId)
print("RunType:", runType)
print("RunTasks:", tasks)
print("RUN ID:", runId)
print("RUN TYPE:", runType)
print("RUN TASKS:", tasks)

output_file = os.getenv('GITHUB_OUTPUT')
with open(output_file, "a") as myfile:
Expand All @@ -118,12 +118,10 @@
print("Error starting self hosted deploy run")
print("Status:", r2.status_code)
print("Error:", r2.reason)
print("Details:", r2.content["validationDetails"])
exit(1)

else:
print("Error during authentication")
print("Status:", r1.status_code)
print("Error:", r1.reason)
print("Details:", r1.content["validationDetails"])
exit(1)

0 comments on commit d7f6cef

Please sign in to comment.