Any way to pass metadata directly to a triggered build?

Hi all,

We have some use cases where we would really really love to pass metadata set in a build into builds that are triggered by the initial build.

AFAICT, right now you can either:

  • Pass through the current value of an environment variable, eg:
- trigger: "app-deploy"
    message: "${BUILDKITE_MESSAGE}"
  • Or you can trigger with statically-defined metadata, eg:
- trigger: "app-deploy"
    release-version: "1.1"

But you cannot just pass through the current value of metadata, eg:

- trigger: "app-deploy"

Right now, we hack this via a convoluted dynamic step insertion where we read the current value of the metadata and upload a dynamic trigger step that creates a trigger with a static metadata value, but we would really love to not have to do this.

As for specific use cases, we have a large set of pipelines that roll updates out to clusters that are all triggered in parallel from a single build-and-push-containers pipeline. We need to pass through the tag of the build that was just performed by the top-level pipeline, and for various reasons, metadata is generally a better fit for this information than env vars.

This has come up a few times in the past as well:

And I was wondering if there were any plans to enable this sort of functionality in the future?


Thanks for raising this @SeanR!

This is excellent feedback, and as you mentioned, there have been others asking for this feature.

We are actively discussing this functionality at the moment, and I will take your suggestion back and share it with the team.