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

feat(gcp): add env vars for buildkite queues and gcp project id #212

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

NotArpit
Copy link
Contributor

@NotArpit NotArpit commented Oct 7, 2023

Context

There is no functionality that supports population of gcpProjectId and queues via environment variables. This limits our ability to run this where config is dynamically populated and gcpProjectId/queues attributes are a concern of the execution environment and not coupled to binary invocation.

Intent

Use GCP_PROJECT_ID and BUILDKITE_QUEUE environment variables to populate config.

Notes

  • If gcpProjectID is an empty string we fall back to the environment variable GCP_PROJECT_ID.
  • If queues aren't specified (i.e. len(queues) == 0) we fall back to BUILDKITE_QUEUE (same as AWS lambda) environment variables.

These changes are backwards compatible to existing usage of this binary. Happy to discuss implementation details if maintainers feel otherwise :)

Reviewers

@triarius @DrJosh9000 PTAL.

@DrJosh9000 DrJosh9000 self-requested a review October 18, 2023 00:25
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -4,7 +4,7 @@ import (
"errors"
"flag"
"fmt"
"io/ioutil"
"io"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 💚

@DrJosh9000 DrJosh9000 merged commit c47be46 into buildkite:master Oct 18, 2023
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.

2 participants