{"action":"created","issue":{"url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/7","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/7/labels{/name}","comments_url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/7/comments","events_url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/7/events","html_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/7","id":179120726,"number":7,"title":"Add a short sha tag to pushed images","user":{"login":"anoldguy","id":1304498,"avatar_url":"https://avatars.githubusercontent.com/u/1304498?v=3","gravatar_id":"","url":"https://api.github.com/users/anoldguy","html_url":"https://github.com/anoldguy","followers_url":"https://api.github.com/users/anoldguy/followers","following_url":"https://api.github.com/users/anoldguy/following{/other_user}","gists_url":"https://api.github.com/users/anoldguy/gists{/gist_id}","starred_url":"https://api.github.com/users/anoldguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anoldguy/subscriptions","organizations_url":"https://api.github.com/users/anoldguy/orgs","repos_url":"https://api.github.com/users/anoldguy/repos","events_url":"https://api.github.com/users/anoldguy/events{/privacy}","received_events_url":"https://api.github.com/users/anoldguy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-26T01:06:53Z","updated_at":"2016-09-27T13:23:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/pulls/7","html_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/7","diff_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/7.diff","patch_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/7.patch"},"body":"This is a proof-of-concept PR.\r\n\r\nI love this plugin!!  This plugin made it a breeze to split up our tests and dropped our previous pipeline times from 10+ min down to under 5 for the worst case, and down to 2m30s in the best case!\r\n\r\nHowever, the tags it produces, are, well...ugly.  They're completely cromulent on the backend, but we use those tag names in a deploy tool, and well, who wants to deploy `my-application-app-build-100`?  We're already used to the git short sha's, so I think it'd be nice to have an option to push that tag to the repo.\r\n\r\nThis commit adds the short sha (`git rev-parse --short $BUILDKITE_COMMIT`) as a tag that's pushed to the repo.\r\n\r\nI'm not emotionally invested in this exact code change, so as long as we've got some way to indicate either \"add the short sha as a tag\" or \"use this as a tag for this build\", my request would be met.\r\n\r\nAgain, thanks for this great plugin!"},"comment":{"url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/comments/249863496","html_url":"https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/pull/7#issuecomment-249863496","issue_url":"https://api.github.com/repos/buildkite-plugins/docker-compose-buildkite-plugin/issues/7","id":249863496,"user":{"login":"anoldguy","id":1304498,"avatar_url":"https://avatars.githubusercontent.com/u/1304498?v=3","gravatar_id":"","url":"https://api.github.com/users/anoldguy","html_url":"https://github.com/anoldguy","followers_url":"https://api.github.com/users/anoldguy/followers","following_url":"https://api.github.com/users/anoldguy/following{/other_user}","gists_url":"https://api.github.com/users/anoldguy/gists{/gist_id}","starred_url":"https://api.github.com/users/anoldguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anoldguy/subscriptions","organizations_url":"https://api.github.com/users/anoldguy/orgs","repos_url":"https://api.github.com/users/anoldguy/repos","events_url":"https://api.github.com/users/anoldguy/events{/privacy}","received_events_url":"https://api.github.com/users/anoldguy/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T13:23:53Z","updated_at":"2016-09-27T13:23:53Z","body":"Hi @sj26!\r\n\r\nWaitwaitwaitwaitwait. You can use ENV vars in the pipeline steps yml?!?\r\n\r\n\\<mind_blown.gif\\>\r\n\r\nOk, if you could use your proposed syntax, that'd be awesome!  However, I don't have an answer for the docker race condition you mention, so... ¯\\\\\\_(ツ)_/¯   We're pretty flexible in the implementation, tho, so let's not rule anything out yet.\r\n\r\nYou know, I just noticed that the plugin uses $BUILDKITE_JOB_ID (sans `-`) to tag the existing images in `COMPOSE_SERVICE_DOCKER_IMAGE_NAME`.  Until we get a better handle on how this could work for more customers than just us, I'll write a step that calculates the equivalent of `COMPOSE_SERVICE_DOCKER_IMAGE_NAME` and tags/pushes after all the tests have completed. It's not perfect, but it works within the framework without too many contortions.\r\n\r\nI don't suppose we could expose the `COMPOSE_SERVICE_DOCKER_IMAGE_NAME` as a short-term workaround?\r\n\r\nMy end goal is to have a tag in my image repo that I can specify. Any solution you can provide and support easily is better than a perfect one that's difficult to maintain or would exist just for us."}}
{"actor":{"display_login":"anoldguy"}}