I have a pipeline with steps that look like
- block: "block 1"
key: block-1
fields:
- text: "Please enter the value"
key: "value1"
- trigger: "another-pipeline"
build:
message: "Use $(buildkite-agent meta-data get 'value1') from #${BUILDKITE_BUILD_NUMBER}"
branch: "some_branch"
env:
VALUE_1: "$(buildkite-agent meta-data get 'value1')"
depends_on: block-1
When I run the pipeline, the meta-data is not retrieved before triggering the other pipeline. Instead, the whole $(buildkite-agent meta-data get 'value1')
is passed to the triggered pipeline, and I get a key not found error because value1
does not exist in the triggered pipeline.
How can I get the meta-data command evaluated first, and only pass the result to the triggered pipeline?