-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BUILD_ID environment variable support #4701
base: master
Are you sure you want to change the base?
Conversation
This commit adds support for the BUILD_ID environment variable. If set, it will be used to construct the build info.
/gcbrun |
@aditya-wazir is Asking because I believe the ClusterFuzz team is wanting to reduce dependency on env variables over the longer-term, so if there's any other way to accomplish this without adding a new env var, we would want to consider that approach first. Correct me if I understand incorrectly @jonathanmetzman |
Hi @marktefftech , |
@@ -207,6 +207,12 @@ def get_latest_artifact_info(branch, target, signed=False): | |||
if not client: | |||
return None | |||
|
|||
build_id = environment.get_value('BUILD_ID') | |||
if build_id is not None and build_id != '': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if build_id
if build_id is not None and build_id != '': | ||
logs.info(f'BUILD_ID env var present with value {build_id}. ' | ||
f'Hence returning its value.') | ||
return {"bid": build_id, "branch": branch, "target": target} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single quotes
This commit adds support for the BUILD_ID environment variable. If set, it will be used to construct the build info.