Skip to content

Commit

Permalink
Fix/additional debug info (#1915)
Browse files Browse the repository at this point in the history
* fix release build

* fix: add additional debug info
  • Loading branch information
m3taphysics authored Aug 28, 2024
1 parent b439fc1 commit 8bec648
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/cloudbuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def generate_body(template_target, name, branch, options, remoteCacheStrategy):
if response.status_code == 200 or response.status_code == 201:
# Override target ENV
os.environ['TARGET'] = new_target_name
print("Copying to TARGET env var. {new_target_name}")
elif response.status_code == 500 and 'Build target name already in use for this project!' in response.text:
print('Target update failed due to a possible race condition. Retrying...')
time.sleep(2) # Add a small delay before retrying
Expand All @@ -115,8 +116,11 @@ def set_parameters(params):
'TEST_ENV_GIT': 'workflowDefault'
}
body = hardcoded_params | params
response = requests.put(f'{URL}/buildtargets/{os.getenv('TARGET')}/envvars', headers=HEADERS, json=body)

url = f'{URL}/buildtargets/{os.getenv("TARGET")}/envvars'
print(f"Request URL: {url}")

response = requests.put(url, headers=HEADERS, json=body)

if response.status_code == 200:
print("Parameters set successfully. Response:", response.json())
else:
Expand Down

0 comments on commit 8bec648

Please sign in to comment.