Hi
I want to collect all the environment variables from a particular build. How is this possible using -
- Buildkite API
- From inside the agent when the build is running
Hi
I want to collect all the environment variables from a particular build. How is this possible using -
Hey!
Like it was discussed in your support email, you can check the API Jobs API | Buildkite Documentation, or with GraphQL you can query by job and have something like:
query {
agent(slug:"{org}/{agent-uuid}") {
jobs (first:50) {
edges {
node {
... on JobTypeCommand {
env
}
}
}
}
}
Best!
Hey Rishabh!
We have a secret URL that can help with this. If you append /variables
to the build URL, you get a fairly comprehensive breakdown. For example: https://buildkite.com/your-organization/pipeline-name/builds/1234/variables/
Hope that helps!
Thanks folks! That helped.