In the v3 tag of this image, if you set a custom agent name using -e BUILDKITE_AGENT_NAME=agent-%n, when the bootstrap runs instead of it getting the interpolated version that's handed to the agent from the backend during registration process (agent-1 or agent-2, etc) it receives agent-%n.
Because of this, the checkout directory is /buildkite/builds/agent--n, which clashes with other agents if they all mount the same builds directory (which you're meant to be able to).
Strangely this problem isn't present in the non-Docker version, or in v2 of the image.
In the v3 tag of this image, if you set a custom agent name using
-e BUILDKITE_AGENT_NAME=agent-%n
, when the bootstrap runs instead of it getting the interpolated version that's handed to the agent from the backend during registration process (agent-1
oragent-2
, etc) it receivesagent-%n
.Because of this, the checkout directory is
/buildkite/builds/agent--n
, which clashes with other agents if they all mount the same builds directory (which you're meant to be able to).Strangely this problem isn't present in the non-Docker version, or in v2 of the image.
For v3:
The bootstrap gets
BUILDKITE_AGENT_NAME=agent-name-%n
in this case. v2 with env works AOK:And v3 with --name argument works AOK: