{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/samson/pulls/comments/35168741","id":35168741,"diff_hunk":"@@ -0,0 +1,7 @@\n+class RemoveUniqueIndexFromBuilds < ActiveRecord::Migration\n+  def change\n+    # Remove unique index on git_sha, users should be able to rebuild docker images against same SHA","path":"db/migrate/20150717135909_remove_unique_index_from_builds.rb","position":3,"original_position":3,"commit_id":"59bcc77ecbf4313841e2109b886f468ce1b002e5","original_commit_id":"59bcc77ecbf4313841e2109b886f468ce1b002e5","user":{"login":"jonmoter","id":1056506,"avatar_url":"https://avatars.githubusercontent.com/u/1056506?v=3","gravatar_id":"","url":"https://api.github.com/users/jonmoter","html_url":"https://github.com/jonmoter","followers_url":"https://api.github.com/users/jonmoter/followers","following_url":"https://api.github.com/users/jonmoter/following{/other_user}","gists_url":"https://api.github.com/users/jonmoter/gists{/gist_id}","starred_url":"https://api.github.com/users/jonmoter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonmoter/subscriptions","organizations_url":"https://api.github.com/users/jonmoter/orgs","repos_url":"https://api.github.com/users/jonmoter/repos","events_url":"https://api.github.com/users/jonmoter/events{/privacy}","received_events_url":"https://api.github.com/users/jonmoter/received_events","type":"User","site_admin":false},"body":"So that means you could have two different Builds that reference the same git commit, and potentially have different labels. What's the advantage of allowing 2 different Build instances that refer to the exact same version of the code?\r\n\r\nAnd why do users need to be able to rebuild a docker image for that SHA, given that the code is exactly the same?  If that is necessary, couldn't we just create functionality that re-runs the `docker build` command?","created_at":"2015-07-21T23:57:53Z","updated_at":"2015-07-21T23:57:53Z","html_url":"https://github.com/zendesk/samson/pull/516#discussion_r35168741","pull_request_url":"https://api.github.com/repos/zendesk/samson/pulls/516","_links":{"self":{"href":"https://api.github.com/repos/zendesk/samson/pulls/comments/35168741"},"html":{"href":"https://github.com/zendesk/samson/pull/516#discussion_r35168741"},"pull_request":{"href":"https://api.github.com/repos/zendesk/samson/pulls/516"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/samson/pulls/516","id":40248179,"html_url":"https://github.com/zendesk/samson/pull/516","diff_url":"https://github.com/zendesk/samson/pull/516.diff","patch_url":"https://github.com/zendesk/samson/pull/516.patch","issue_url":"https://api.github.com/repos/zendesk/samson/issues/516","number":516,"state":"open","locked":false,"title":"Trigger docker build creation when webhooks are triggered.","user":{"login":"henders","id":515143,"avatar_url":"https://avatars.githubusercontent.com/u/515143?v=3","gravatar_id":"","url":"https://api.github.com/users/henders","html_url":"https://github.com/henders","followers_url":"https://api.github.com/users/henders/followers","following_url":"https://api.github.com/users/henders/following{/other_user}","gists_url":"https://api.github.com/users/henders/gists{/gist_id}","starred_url":"https://api.github.com/users/henders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henders/subscriptions","organizations_url":"https://api.github.com/users/henders/orgs","repos_url":"https://api.github.com/users/henders/repos","events_url":"https://api.github.com/users/henders/events{/privacy}","received_events_url":"https://api.github.com/users/henders/received_events","type":"User","site_admin":false},"body":"Workflow now is:\r\n- Webhook gets fired\r\n- Build + Release records are built if project.release_branch is set\r\n- Docker image is created + pushed if project.deploy_with_docker + project.auto_release_docker_image are set\r\n- Commit is deployed if the branch matches any webhook mappings to stages.\r\n\r\nI'll leave the actual hooking up to appropriate docker image reference when kicking off the deploys to another PR when we get staging/production up to actually test docker image creation first.\r\n\r\n\r\nScreenshot with docker feature enabled for project:\r\n![samson](https://cloud.githubusercontent.com/assets/515143/8780090/af4c8bf0-2efe-11e5-88ff-3507812ef4c4.png)\r\n\r\nScreenshot with docker feature disabled for project:\r\n![samson1](https://cloud.githubusercontent.com/assets/515143/8780100/b6da50be-2efe-11e5-86a1-eac1ca14251b.png)\r\n\r\n\r\n/cc @zendesk/runway \r\n\r\n### References\r\n - Jira link:\r\n\r\n### Risks\r\n - None","created_at":"2015-07-17T16:28:52Z","updated_at":"2015-07-21T23:57:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07379b1096d99b148fb3ea34d827d1de777d1eea","assignee":{"login":"henders","id":515143,"avatar_url":"https://avatars.githubusercontent.com/u/515143?v=3","gravatar_id":"","url":"https://api.github.com/users/henders","html_url":"https://github.com/henders","followers_url":"https://api.github.com/users/henders/followers","following_url":"https://api.github.com/users/henders/following{/other_user}","gists_url":"https://api.github.com/users/henders/gists{/gist_id}","starred_url":"https://api.github.com/users/henders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henders/subscriptions","organizations_url":"https://api.github.com/users/henders/orgs","repos_url":"https://api.github.com/users/henders/repos","events_url":"https://api.github.com/users/henders/events{/privacy}","received_events_url":"https://api.github.com/users/henders/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/samson/pulls/516/commits","review_comments_url":"https://api.github.com/repos/zendesk/samson/pulls/516/comments","review_comment_url":"https://api.github.com/repos/zendesk/samson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/samson/issues/516/comments","statuses_url":"https://api.github.com/repos/zendesk/samson/statuses/59bcc77ecbf4313841e2109b886f468ce1b002e5","head":{"label":"zendesk:shender/automated_docker_builds","ref":"shender/automated_docker_builds","sha":"59bcc77ecbf4313841e2109b886f468ce1b002e5","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":20208662,"name":"samson","full_name":"zendesk/samson","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/samson","description":"Web interface for deployments","fork":false,"url":"https://api.github.com/repos/zendesk/samson","forks_url":"https://api.github.com/repos/zendesk/samson/forks","keys_url":"https://api.github.com/repos/zendesk/samson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/samson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/samson/teams","hooks_url":"https://api.github.com/repos/zendesk/samson/hooks","issue_events_url":"https://api.github.com/repos/zendesk/samson/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/samson/events","assignees_url":"https://api.github.com/repos/zendesk/samson/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/samson/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/samson/tags","blobs_url":"https://api.github.com/repos/zendesk/samson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/samson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/samson/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/samson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/samson/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/samson/languages","stargazers_url":"https://api.github.com/repos/zendesk/samson/stargazers","contributors_url":"https://api.github.com/repos/zendesk/samson/contributors","subscribers_url":"https://api.github.com/repos/zendesk/samson/subscribers","subscription_url":"https://api.github.com/repos/zendesk/samson/subscription","commits_url":"https://api.github.com/repos/zendesk/samson/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/samson/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/samson/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/samson/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/samson/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/samson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/samson/merges","archive_url":"https://api.github.com/repos/zendesk/samson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/samson/downloads","issues_url":"https://api.github.com/repos/zendesk/samson/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/samson/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/samson/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/samson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/samson/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/samson/releases{/id}","created_at":"2014-05-27T05:55:57Z","updated_at":"2015-07-20T20:37:48Z","pushed_at":"2015-07-21T23:50:23Z","git_url":"git://github.com/zendesk/samson.git","ssh_url":"git@github.com:zendesk/samson.git","clone_url":"https://github.com/zendesk/samson.git","svn_url":"https://github.com/zendesk/samson","homepage":null,"size":146740,"stargazers_count":459,"watchers_count":459,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":37,"forks":59,"open_issues":37,"watchers":459,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"fae46dfbd1adfb7efb8cf405bec7fad65c95096b","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":20208662,"name":"samson","full_name":"zendesk/samson","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/samson","description":"Web interface for deployments","fork":false,"url":"https://api.github.com/repos/zendesk/samson","forks_url":"https://api.github.com/repos/zendesk/samson/forks","keys_url":"https://api.github.com/repos/zendesk/samson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/samson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/samson/teams","hooks_url":"https://api.github.com/repos/zendesk/samson/hooks","issue_events_url":"https://api.github.com/repos/zendesk/samson/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/samson/events","assignees_url":"https://api.github.com/repos/zendesk/samson/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/samson/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/samson/tags","blobs_url":"https://api.github.com/repos/zendesk/samson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/samson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/samson/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/samson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/samson/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/samson/languages","stargazers_url":"https://api.github.com/repos/zendesk/samson/stargazers","contributors_url":"https://api.github.com/repos/zendesk/samson/contributors","subscribers_url":"https://api.github.com/repos/zendesk/samson/subscribers","subscription_url":"https://api.github.com/repos/zendesk/samson/subscription","commits_url":"https://api.github.com/repos/zendesk/samson/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/samson/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/samson/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/samson/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/samson/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/samson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/samson/merges","archive_url":"https://api.github.com/repos/zendesk/samson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/samson/downloads","issues_url":"https://api.github.com/repos/zendesk/samson/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/samson/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/samson/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/samson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/samson/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/samson/releases{/id}","created_at":"2014-05-27T05:55:57Z","updated_at":"2015-07-20T20:37:48Z","pushed_at":"2015-07-21T23:50:23Z","git_url":"git://github.com/zendesk/samson.git","ssh_url":"git@github.com:zendesk/samson.git","clone_url":"https://github.com/zendesk/samson.git","svn_url":"https://github.com/zendesk/samson","homepage":null,"size":146740,"stargazers_count":459,"watchers_count":459,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":37,"forks":59,"open_issues":37,"watchers":459,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/samson/pulls/516"},"html":{"href":"https://github.com/zendesk/samson/pull/516"},"issue":{"href":"https://api.github.com/repos/zendesk/samson/issues/516"},"comments":{"href":"https://api.github.com/repos/zendesk/samson/issues/516/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/samson/pulls/516/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/samson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/samson/pulls/516/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/samson/statuses/59bcc77ecbf4313841e2109b886f468ce1b002e5"}}}}