Is there a way to add emoji in the label when using buildkite-agent step v3 | Buildkite Documentation to update a step at runtime please? When I add an emoji (e.g. ) I got a
mapping values are not allowed in this context
error, tried to add a \
to escape the :
, but got same error.
Hi @Wei! Welcome to the community!
The step update command should allow you to update with an emoji, are you able to share the exact command you are running?
Thanks!
Jeremy
Hi @jeremy, thanks for getting back to me. Below is my step:
- label: ":docker: configure image tag"
key: tag:create
commands:
- TAG=$(some commands)
- buildkite-agent meta-data set "TAG" "\${TAG}"
- buildkite-agent step update "label" ":docker: TAG=\${TAG}"
agents:
queue: ${BUILD_AGENT}
Please let me know if you are unable to reproduce. If so, it might be some wrapper or settings on our end.
Hi @Wei !
So you can get it working by running the step like this:
- label: ":docker: configure image tag"
key: tag:create
command: |
TAG=$(echo "newtag")
buildkite-agent meta-data set "TAG" "$$TAG"
buildkite-agent step update "label" ":docker: TAG=$$TAG"
agents:
queue: ${BUILD_AGENT}
You just need to escape the variable reference, with $$TAG
and change the command step to a multi-line command step with command: |
2 Likes
That worked! Thank you @jeremy!