buildkite-plugins / docker-compose-buildkite-plugin

🐳⚡️ Run build scripts, and build + push images, w/ Docker Compose
MIT License
171 stars 138 forks source link

`secrets` option fails with `unknown flag: --secret` #433

Closed henare closed 1 day ago

henare commented 4 months ago

When specifying the secrets option the build fails:

$ docker compose -f .buildkite/docker-compose.yml -p buildkite[redacted] -f docker-compose.buildkite-[redacted]-override.yml build --pull --secret id=MY_SECRET --build-arg BUILDKIT_INLINE_CACHE=1 app
unknown flag: --secret
🚨 Error: The command exited with status 16
user command error: The plugin docker-compose command hook exited with status 16

This is because docker compose build doesn't have a --secrets option. Either I'm missing something obvious or I can't see how this ever worked :slightly_smiling_face:

Secrets can be used with this plugin but they need to be specified in the compose file. Trying to use the secrets option in my pipeline file sent me on a wild goose chase :turkey: I think the option should be removed if it doesn't work and is misleading.

toote commented 2 weeks ago

@henare so sorry about that... I did some research and don't think that this plugin is the right place to determine secrets to share as the compose file would need several modifications and overlays for it to work properly that I believe should be properly version-controlled with the rest of the codebase.

Thus, I created #453 to remove the option from the plugin and prevent others from the wild goose chase you had to endure.