docker-compose-buildkite-plugin
docker-compose-buildkite-plugin copied to clipboard
Feature request: implement static analysis against docker-compose
I saw an engineer today who was new to Buildkite have difficulty hooking up all the pieces when creating a pipeline. We can make the experience better for both new and experienced engineers by adding some form of static analysis.
I think there's a lot that we can do here, but as a first step, we could perform validation against the docker-compose file. At a minimum it would be nice to ensure that the service exists within docker-compose that the user is attempting to build/leverage in a build step.
STR
Create a pipeline that references a service not defined in docker-compose.yml (or whichever docker-compose file is leveraged). Example:
steps:
- name: ':docker: :package:'
plugins:
'docker-compose#v1.8.4':
build: some-invalid-docker-service
image-repository: my.registry/place
- wait
- command: ./bin/test
plugins:
'docker-compose#v1.8.4':
run: some-invalid-docker-service
And an example docker-compose.yml file:
version: '2'
services:
my-default-service:
build: .
Current Behavior
You see a big error like 🚨 Error: The plugin github.com/buildkite-plugins/docker-compose-buildkite-plugin#v1.8.4 command hook exited with an error: Error running /bin/bash -c /tmp/buildkite-agent-bootstrap-hook-runner-...: exit status 1
Expected Behavior
You're given an error message which will help you understand and track down the issue better within the default expanded section of the log output.
Completely agree we need better errors around this stuff!
In the time since this was reported a lot of improvements has been done with regards to reporting errors with the plugin. If there is anything in particular that you would rather see, feel free to open a new ticket or - better yet - a PR and we'll be more than happy to work with you on getting it into the next version!