Pass forward metadata in trigger step?
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 378
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 74
Description
Scenario:
I'm using the [docker-compose plugin](https://github.com/buildkite-plugins/docker-compose-buildkite-plugin) to prebuild my image in Pipeline A. The plugin generates a metadata key for that build to ensure the same image is being used throughout the pipeline.
My pipeline has a trigger to Pipeline B, which could in theory use the same image. Unfortunately, there doesn't seem to be a way to pass forward that metadata to Pipeline B, so I need to rebuild the image again in Pipeline B.
While I can guess what the key will be, it uses the `BUILDKITE_BUILD_NUMBER`, which can't be interpolated as an env var in the pipeline file, so I can't recreate the metadata value in the pipeline manually.
I could always create a step that creates the trigger step dynamically, but it'd be nice if there was a way to just pass forward certain metadata between pipelines.
Contributor guide
Research direction
Start by tracing how trigger steps handle build metadata and how metadata is exposed between Pipeline A and Pipeline B. Define the supported way to select metadata keys for forwarding, then verify that the downstream pipeline can reuse the generated image metadata without rebuilding it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100