buildkite / feedback

Got feedback? Please let us know!
https://buildkite.com
25 stars 24 forks source link

Allow key/value metadata to be scoped to branch, pipeline and organization #295

Open lox opened 6 years ago

lox commented 6 years ago

Currently the agent supports setting key/value metadata that is attributed to a Job, but available from other Jobs within a Build.

This allows for information to be passed from one step to another, which along with artifacts are the building blocks for making steps stateless and able to run on any agent.

It would be great to be able to "scope" this metadata wider, say to a branch, or a pipeline or an organization. This could be used for:

I imagine the API would look like:

$ buildkite-agent meta-data set --scope pipeline "foo" "llamas"
$ buildkite-agent meta-data get --scope pipeline "foo" 
llamas

In terms of permissions, starting with branch or pipeline or organization would keep things simple, but eventually we could add scopes for team or possibly allow for metadata queries on other pipelines e.g "give me the latest successful build from this other pipeline".

I've implemented the agent side of this at https://github.com/buildkite/agent/pull/495.