Closed ankurd1 closed 7 years ago
Hey @legalosLOTR, sorry you've had troubles with this. It's only supported in Buildkite Agent v2, but we failed to mention that in the example. Sorry!
We’ve just updated the docs to include more information about this: https://buildkite.com/docs/agent/cli-pipeline#environment-variable-substitution (whole new section, including notes for a workaround for getting it to work with Buildkite Agent v2) https://buildkite.com/docs/pipelines/trigger-step (note on the bottom)
I recommend upgrading to agent v3 if you can, but there is that workaround if you need.
Let me know if that clears things up!
Ahh thanks @toolmantim! Is agent v3 stable enough to use? Also, is there a migration guide or would it "just work"?
It's close to stable, and is being used in prod in quite a few places. There isn't yet a migration guide sorry. The biggest change is the docker-compose support has been removed in favor of https://github.com/buildkite-plugins/docker-compose-buildkite-plugin
As per the docs, I have a trigger step in my pipeline.yml that looks like this:
This leads to a "deploy" build with branch=$BUILDKITE_BRANCH. Basically the string ($BUILDKITE_BRANCH) and not the actual branch name. I also tried
${BUILDKITE_BRANCH}
but same issue there.