docker-login-buildkite-plugin icon indicating copy to clipboard operation
docker-login-buildkite-plugin copied to clipboard

Username from environment variable

Open PriyaSudip opened this issue 1 year ago • 3 comments

Currently username is passed through pipeline.yml as plugin input or read from agent hook if env for username set as "BUILDKITE_PLUGIN_DOCKER_LOGIN_USERNAME". It is not interpolated if it is set as an env via pipeline or post-checkout hook etc.

Since we are already passing the username in the pipeline.yml can we consider reading it from pipeline env or repo hook etc?

PriyaSudip avatar Aug 22 '24 02:08 PriyaSudip

Instead of using the username plugin option, couldn't the pipeline or hook set the variable BUILDKITE_PLUGIN_DOCKER_LOGIN_USERNAME directly? I don't see why that wouldn't work

toote avatar Aug 22 '24 03:08 toote

@toote just removing username from plugin option works if we pass the env BUILDKITE_PLUGIN_DOCKER_LOGIN_USERNAME from pipeline directly or set via post-checkout.

Thanks!

PriyaSudip avatar Aug 22 '24 03:08 PriyaSudip

It seems the other usecase is to pass org specific env var to username in the plugin, this would need plugin username to accept env variable which could be anything.

PriyaSudip avatar Aug 22 '24 06:08 PriyaSudip