{"action":"created","issue":{"url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/13","repository_url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin","labels_url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/13/comments","events_url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/13/events","html_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/13","id":188831901,"number":13,"title":"Use a configuration file to load the pre-built image","user":{"login":"ianyamey","id":142204,"avatar_url":"https://avatars.githubusercontent.com/u/142204?v=3","gravatar_id":"","url":"https://api.github.com/users/ianyamey","html_url":"https://github.com/ianyamey","followers_url":"https://api.github.com/users/ianyamey/followers","following_url":"https://api.github.com/users/ianyamey/following{/other_user}","gists_url":"https://api.github.com/users/ianyamey/gists{/gist_id}","starred_url":"https://api.github.com/users/ianyamey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianyamey/subscriptions","organizations_url":"https://api.github.com/users/ianyamey/orgs","repos_url":"https://api.github.com/users/ianyamey/repos","events_url":"https://api.github.com/users/ianyamey/events{/privacy}","received_events_url":"https://api.github.com/users/ianyamey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-11-11T19:26:01Z","updated_at":"2016-11-18T03:35:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/pulls/13","html_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/13","diff_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/13.diff","patch_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/13.patch"},"body":"Adds support for docker-compose services that have complex (multiline) `build` configurations in their yaml files.\r\n\r\n**Context**\r\nA docker-compose.yml allows the `build` configuration to be a string:\r\n\r\n```\r\napp:\r\n  build: .\r\n```\r\n\r\nor an object\r\n\r\n```\r\napp:\r\n  build:\r\n    context: .\r\n    dockerfile: Dockerfile-alternative\r\n    args:\r\n     somearg: foo\r\n```\r\n\r\n**Solution**\r\nInstead of using `sed` to replace the `build: .` line with a path to the prebuilt image, the plugin will generate a docker-compose.buildkite-app-override.yml file of the form:\r\n\r\n```\r\nversion: '2'\r\nservices:\r\n  app:\r\n    image: your-docker-registry.io/path-to/prebuilt-image\r\n```\r\n\r\nWhen the `docker-compose run` command is called, it first checks to see if the pre-built image exists before building it.\r\n\r\n**Open questions**\r\n- [x] Are there any users of this plugin that use the version 1 syntax for their docker-compose files?\r\n  - If so, we can test for the presence of `version: '2'` in their docker compose file, and revert to the `sed` replacement for v1 users. For simplicity, I opted to leave this out until I hear that it's a requirement."},"comment":{"url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/comments/261440854","html_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/13#issuecomment-261440854","issue_url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/13","id":261440854,"user":{"login":"lox","id":15758,"avatar_url":"https://avatars.githubusercontent.com/u/15758?v=3","gravatar_id":"","url":"https://api.github.com/users/lox","html_url":"https://github.com/lox","followers_url":"https://api.github.com/users/lox/followers","following_url":"https://api.github.com/users/lox/following{/other_user}","gists_url":"https://api.github.com/users/lox/gists{/gist_id}","starred_url":"https://api.github.com/users/lox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lox/subscriptions","organizations_url":"https://api.github.com/users/lox/orgs","repos_url":"https://api.github.com/users/lox/repos","events_url":"https://api.github.com/users/lox/events{/privacy}","received_events_url":"https://api.github.com/users/lox/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T03:35:38Z","updated_at":"2016-11-18T03:35:38Z","body":"Thanks so much for the PR @ianyamey! "}}
{"actor":{"display_login":"lox"}}