Need clarification on meta data usage pattern

Hi there,

I’m writing because there’s no in-depth information on the meta data that we set using the buildkite-agent meta-data command. From the agent source code, I think this is sent to BK server, however, questions remain:

  1. Do we have a limitation on how many items we can set?
  2. Is there a limitation on the length of the key/value?
  3. Is there a way to delete existing meta data items?
  4. Who have access to that meta data? Can we store secrets in there?
  5. If we can store secrets in meta data, can we make it private to the current pipeline and the sub-pipelines triggered by the current pipeline?

Thanks!
Kai

Sorry, I know this is a super old thread, and apologies we didn’t get to it sooner — but we wanted to check in and see if you figured this out?

Meta-data is intended for simple pieces of key/value data that you want to use to identify or filter your builds. It can be used to filter results when looking at a list of builds on buildkite.com, when using the builds api, or to transport small values between jobs in the same build using the agent meta-data commands.

There’s some more information in the docs here:

There is currently no hard limit on the number of values you can set, although we’d advise keeping below ~10 would be sensible. And the same for the size of each item, but we’d suggest no more than 1KB per key/value.

Meta-data is not suitable for secrets. It can be accessed by anybody who can see the build. Pipeline or build environment variables are also not suitable. We’ve got a guide on securely storing secrets for your builds here:

1 Like