{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/34898898","id":34898898,"diff_hunk":"@@ -0,0 +1,218 @@\n+# Build Hooks\n+\n+## Abstract\n+\n+A proposal for supporting the execution of hooks in the build lifecycle.\n+\n+\n+## Motivation\n+\n+Users need to execute custom actions at different stages of the build process.\n+OpenShift provides full flexibility on how builds are performed through the\n+*Custom* build strategy, and *Source-To-Image* builds also allow customization\n+via its `assemble` script. However, as we'll see, those extensibility points\n+have their limitations.\n+\n+At the time of writing, **Deployments** have a hook mechanism that supports the\n+execution of arbitrary commands before and after a deployment occurs,\n+individually supported by each *Deployment Strategy*, namely *Recreate* and\n+*Rolling*.\n+The third existing strategy, *Custom*, does not support hooks.\n+The implementation is done in the strategy level as to allow different\n+strategies to support a potentially different set of hooks.\n+\n+Goals of this design:\n+\n+1. Identify build hook use cases\n+2. Discuss and describe implementation details\n+\n+\n+## Use cases\n+\n+### 1. Build pipeline\n+\n+As an application developer, I want to be able to [trigger a build after an\n+upstream build completes](https://github.com/openshift/origin/issues/1228#issue-59933179),\n+creating a build pipeline.\n+\n+\n+### 2. Integration with external system\n+\n+As an application developer, I want to be notified or notify other people after\n+a build completes, email or otherwise, including the build result (success or\n+failure).","path":"docs/proposals/build-hooks.md","position":null,"original_position":43,"commit_id":"7a99eb2f9ce3585ee31f124d0d283825a6e3b552","original_commit_id":"e2ca3fd90df533b5265804c6b9949029ea3285ef","user":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"body":">\n> > +As an application developer, I want to be notified or notify other people after\n> > +a build completes, email or otherwise, including the build result (success or\n> > +failure).\n>\n> If you need to report it to a webhook. If you trigger something based on a\n> build completing, not being able to exactly use the output of the build is\n> unacceptable (ie it's a bug if you can't get the correct image).\n>\n>\n\nThis section was updated to include the Docker image ID that was built.\n","created_at":"2015-07-17T15:16:07Z","updated_at":"2015-07-17T15:16:07Z","html_url":"https://github.com/openshift/origin/pull/3736#discussion_r34898898","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/3736","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/34898898"},"html":{"href":"https://github.com/openshift/origin/pull/3736#discussion_r34898898"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/3736"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/3736","id":40140819,"html_url":"https://github.com/openshift/origin/pull/3736","diff_url":"https://github.com/openshift/origin/pull/3736.diff","patch_url":"https://github.com/openshift/origin/pull/3736.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/3736","number":3736,"state":"open","locked":false,"title":"[WIP] Build hooks proposal","user":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"body":"First draft of the proposal, want to run it by @smarterclayton and @bparees for discussion.\r\n@mfojtik @mnagy FYI","created_at":"2015-07-16T15:18:40Z","updated_at":"2015-07-17T15:16:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be8c2ed08263d3d1507b9e1ce43a16b3b065c855","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/3736/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/3736/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/3736/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/7a99eb2f9ce3585ee31f124d0d283825a6e3b552","head":{"label":"rhcarvalho:build-hook-proposal","ref":"build-hook-proposal","sha":"7a99eb2f9ce3585ee31f124d0d283825a6e3b552","user":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"repo":{"id":30794668,"name":"origin","full_name":"rhcarvalho/origin","owner":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhcarvalho/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/rhcarvalho/origin","forks_url":"https://api.github.com/repos/rhcarvalho/origin/forks","keys_url":"https://api.github.com/repos/rhcarvalho/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhcarvalho/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhcarvalho/origin/teams","hooks_url":"https://api.github.com/repos/rhcarvalho/origin/hooks","issue_events_url":"https://api.github.com/repos/rhcarvalho/origin/issues/events{/number}","events_url":"https://api.github.com/repos/rhcarvalho/origin/events","assignees_url":"https://api.github.com/repos/rhcarvalho/origin/assignees{/user}","branches_url":"https://api.github.com/repos/rhcarvalho/origin/branches{/branch}","tags_url":"https://api.github.com/repos/rhcarvalho/origin/tags","blobs_url":"https://api.github.com/repos/rhcarvalho/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhcarvalho/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhcarvalho/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhcarvalho/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhcarvalho/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/rhcarvalho/origin/languages","stargazers_url":"https://api.github.com/repos/rhcarvalho/origin/stargazers","contributors_url":"https://api.github.com/repos/rhcarvalho/origin/contributors","subscribers_url":"https://api.github.com/repos/rhcarvalho/origin/subscribers","subscription_url":"https://api.github.com/repos/rhcarvalho/origin/subscription","commits_url":"https://api.github.com/repos/rhcarvalho/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhcarvalho/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhcarvalho/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhcarvalho/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhcarvalho/origin/contents/{+path}","compare_url":"https://api.github.com/repos/rhcarvalho/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhcarvalho/origin/merges","archive_url":"https://api.github.com/repos/rhcarvalho/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhcarvalho/origin/downloads","issues_url":"https://api.github.com/repos/rhcarvalho/origin/issues{/number}","pulls_url":"https://api.github.com/repos/rhcarvalho/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/rhcarvalho/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/rhcarvalho/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhcarvalho/origin/labels{/name}","releases_url":"https://api.github.com/repos/rhcarvalho/origin/releases{/id}","created_at":"2015-02-14T11:22:53Z","updated_at":"2015-04-29T10:04:56Z","pushed_at":"2015-07-17T13:17:50Z","git_url":"git://github.com/rhcarvalho/origin.git","ssh_url":"git@github.com:rhcarvalho/origin.git","clone_url":"https://github.com/rhcarvalho/origin.git","svn_url":"https://github.com/rhcarvalho/origin","homepage":"https://openshift.github.io","size":121351,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"f8bc54440cf682c7fe832363ee059f6bf1c97b4f","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-07-17T14:32:48Z","pushed_at":"2015-07-17T15:07:33Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":194317,"stargazers_count":552,"watchers_count":552,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":304,"mirror_url":null,"open_issues_count":424,"forks":304,"open_issues":424,"watchers":552,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/3736"},"html":{"href":"https://github.com/openshift/origin/pull/3736"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/3736"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/3736/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/3736/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/3736/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/7a99eb2f9ce3585ee31f124d0d283825a6e3b552"}}}}