Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aditya-wazir
Copy link
Contributor

This commit adds support for the BUILD_ID environment variable. If set, it will be used to construct the build info.

This commit adds support for the BUILD_ID environment variable. If set, it will be used to construct the build info.
@svasudevprasad
Copy link
Collaborator

/gcbrun

@marktefftech
Copy link
Collaborator

@aditya-wazir is BUILD_ID used elsewhere, or is this a net-new environment variable being introduced?

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

@aditya-wazir
Copy link
Contributor Author

@aditya-wazir is BUILD_ID used elsewhere, or is this a net-new environment variable being introduced?

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 ,
BUILD_ID is a new environment variable introduced by us to send BUILD ID directly through clusterfuzz run command. we are doing this so that the build can be configured via ATP tests. Without this, there is no mechanism to update the build id used for a test.

@@ -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 != '':
Copy link
Collaborator

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}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single quotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants