buildkite-plugins / docker-compose-buildkite-plugin

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

Add labels to run container #376

Closed francoiscampbell closed 1 year ago

francoiscampbell commented 1 year ago

Adds labels that can be useful for finding the containers spawned on a host by this plugin. This can also enable automated tools to associate these docker-compose containers with the agent that started them.

Tested on our infra: image

Question for maintainers: should this be behind a plugin config? I don't think so since it doesn't affect the behaviour of the container itself, but I'm happy to make it conditional if needed.

toote commented 1 year ago

This is a great addition! :clap:

I would indeed add it behind a configuration, but have it on by default... the reason is two-fold: 1- whoever doesn't want/need the behaviour will be able to turn it off 2- it will make it simpler to not have to change all 75 tests and only turn it on in the feature-specific tests :wink: :wink:

francoiscampbell commented 1 year ago

Thanks for the feedback @toote, made it conditional (default true), updated the existing tests to disable the option, and added a new test.