buildkite-plugins / docker-compose-buildkite-plugin

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

Wait for cluster to be healthy #355

Closed usmanismail closed 1 year ago

usmanismail commented 2 years ago

Currently the compose plugin is not waiting for the services to be healthy. This is causing problems in our CI where some containers need warmup time

toote commented 1 year ago

it is indeed an interesting use case, unfortunately, the change broke existing tests with dependencies.

How about adding it behind an option that defaults to false? This not only would avoid a major release, but it would also mean that existing tests wouldn't break and you would just need to add a couple new ones only. What do you think?

toote commented 1 year ago

@usmanismail let us know if you are still interested in working on this functionality. If you are not but still want this functionality, either allow us permissions to push on this PR or let us know and close this PR so that we can open a new one :)

usmanismail commented 1 year ago

Hi Sorry, I found a cleaner solution for my issue i.e. Using a condition: service_healthy inside the docker compose file. Feel free to close and create a new PR or repurpose this one as needed.

toote commented 1 year ago

Thanks a lot for your contribution anyhow, I believe that this may be a good feature anyways for those that can't modify their docker compose file so we'll add it as a feature :)