Sharing metadata with multiple pipelines

We have two pipelines

  1. pipeline for pull request
  2. pipeline for merge

we would like to set some metadata on the pull request pipeline and access it in the merge pipeline

is it possible??

Hey @lewis!

Thanks for your question!

A simialr question was asked previously and Jarryd provided the answer here: How to make buildkite-agent meta-data get "key" optional - #3 by jarryd

TL;DR: it is possible by passing in the job UUID using the --job flag.

Hope that helps with your use case.


thanks @bmc I dont know what the job id is from the other pipeline does that mean I need to query the buildkite api to get it?

Hey @lewis, using the API is the way to go here. You can query builds from a pipeline and then use any of the job IDs returned in that set.
The buildkite-agent meta-data get command requires a job ID to make the API request, but on the server side, we search for meta-data attached to the build that job is attributed to, so it doesn’t matter so much which jobs ID you use.