{"action":"created","comment":{"url":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/comments/198244719","pull_request_review_id":132140827,"id":198244719,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODI0NDcxOQ==","diff_hunk":"@@ -183,21 +183,25 @@ func handleBuildTimeout(f *os.File, timeoutErr error) {\n \tf.Write([]byte{4})\n }\n \n-func filterTeardowns(build screwdriver.Build) ([]screwdriver.CommandDef, []screwdriver.CommandDef) {\n+func filterTeardowns(build screwdriver.Build) ([]screwdriver.CommandDef, []screwdriver.CommandDef, []screwdriver.CommandDef) {\n \tuserCommands := []screwdriver.CommandDef{}\n-\tteardownCommands := []screwdriver.CommandDef{}\n+\tsdTeardownCommands := []screwdriver.CommandDef{}\n+\tuserTeardownCommands := []screwdriver.CommandDef{}\n \n \tfor _, cmd := range build.Commands {\n-\t\tisTeardown, _ := regexp.MatchString(\"sd-teardown-*\", cmd.Name)\n+\t\tisSdTeardown, _ := regexp.MatchString(\"sd-teardown-*\", cmd.Name)\n+\t\tisUserTeardown, _ := regexp.MatchString(\"teardown-*\", cmd.Name)","path":"executor/executor.go","position":14,"original_position":14,"commit_id":"416c32ac0e09bf40b7032f1e4c5fb499ec33dc36","original_commit_id":"416c32ac0e09bf40b7032f1e4c5fb499ec33dc36","user":{"login":"tkyi","id":3230529,"node_id":"MDQ6VXNlcjMyMzA1Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/3230529?v=4","gravatar_id":"","url":"https://api.github.com/users/tkyi","html_url":"https://github.com/tkyi","followers_url":"https://api.github.com/users/tkyi/followers","following_url":"https://api.github.com/users/tkyi/following{/other_user}","gists_url":"https://api.github.com/users/tkyi/gists{/gist_id}","starred_url":"https://api.github.com/users/tkyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkyi/subscriptions","organizations_url":"https://api.github.com/users/tkyi/orgs","repos_url":"https://api.github.com/users/tkyi/repos","events_url":"https://api.github.com/users/tkyi/events{/privacy}","received_events_url":"https://api.github.com/users/tkyi/received_events","type":"User","site_admin":false},"body":"I think this regexp will overlap with `sd-teardown-*`, since the MatchString \r\nYou need to use `^sd-teardown-*` and `^teardown-*` to match the beginning of the string","created_at":"2018-06-26T18:04:12Z","updated_at":"2018-06-26T18:04:12Z","html_url":"https://github.com/screwdriver-cd/launcher/pull/190#discussion_r198244719","pull_request_url":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/190","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/comments/198244719"},"html":{"href":"https://github.com/screwdriver-cd/launcher/pull/190#discussion_r198244719"},"pull_request":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/190"}}},"pull_request":{"url":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/190","id":197261336,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MjYxMzM2","html_url":"https://github.com/screwdriver-cd/launcher/pull/190","diff_url":"https://github.com/screwdriver-cd/launcher/pull/190.diff","patch_url":"https://github.com/screwdriver-cd/launcher/pull/190.patch","issue_url":"https://api.github.com/repos/screwdriver-cd/launcher/issues/190","number":190,"state":"open","locked":false,"title":"feat: support user-teardown","user":{"login":"d2lam","id":3401924,"node_id":"MDQ6VXNlcjM0MDE5MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3401924?v=4","gravatar_id":"","url":"https://api.github.com/users/d2lam","html_url":"https://github.com/d2lam","followers_url":"https://api.github.com/users/d2lam/followers","following_url":"https://api.github.com/users/d2lam/following{/other_user}","gists_url":"https://api.github.com/users/d2lam/gists{/gist_id}","starred_url":"https://api.github.com/users/d2lam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d2lam/subscriptions","organizations_url":"https://api.github.com/users/d2lam/orgs","repos_url":"https://api.github.com/users/d2lam/repos","events_url":"https://api.github.com/users/d2lam/events{/privacy}","received_events_url":"https://api.github.com/users/d2lam/received_events","type":"User","site_admin":false},"body":"Allow user-defined teardown steps. They will be run in separate shells, just like the screwdriver teardown steps. \r\n\r\n_**Will look into passing environment variables in a second pass.**_ \r\n\r\nRelated: https://github.com/screwdriver-cd/screwdriver/issues/1126","created_at":"2018-06-25T23:16:28Z","updated_at":"2018-06-26T18:04:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4cad7bd0737b2c41c43ea96ede0f1066cfdb0ed","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/190/commits","review_comments_url":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/190/comments","review_comment_url":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/screwdriver-cd/launcher/issues/190/comments","statuses_url":"https://api.github.com/repos/screwdriver-cd/launcher/statuses/416c32ac0e09bf40b7032f1e4c5fb499ec33dc36","head":{"label":"screwdriver-cd:userTeardown","ref":"userTeardown","sha":"416c32ac0e09bf40b7032f1e4c5fb499ec33dc36","user":{"login":"screwdriver-cd","id":19417863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDE3ODYz","avatar_url":"https://avatars0.githubusercontent.com/u/19417863?v=4","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"repo":{"id":63980841,"node_id":"MDEwOlJlcG9zaXRvcnk2Mzk4MDg0MQ==","name":"launcher","full_name":"screwdriver-cd/launcher","owner":{"login":"screwdriver-cd","id":19417863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDE3ODYz","avatar_url":"https://avatars0.githubusercontent.com/u/19417863?v=4","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/screwdriver-cd/launcher","description":"The entrypoint for job launching in Screwdriver","fork":false,"url":"https://api.github.com/repos/screwdriver-cd/launcher","forks_url":"https://api.github.com/repos/screwdriver-cd/launcher/forks","keys_url":"https://api.github.com/repos/screwdriver-cd/launcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/screwdriver-cd/launcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/screwdriver-cd/launcher/teams","hooks_url":"https://api.github.com/repos/screwdriver-cd/launcher/hooks","issue_events_url":"https://api.github.com/repos/screwdriver-cd/launcher/issues/events{/number}","events_url":"https://api.github.com/repos/screwdriver-cd/launcher/events","assignees_url":"https://api.github.com/repos/screwdriver-cd/launcher/assignees{/user}","branches_url":"https://api.github.com/repos/screwdriver-cd/launcher/branches{/branch}","tags_url":"https://api.github.com/repos/screwdriver-cd/launcher/tags","blobs_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/screwdriver-cd/launcher/statuses/{sha}","languages_url":"https://api.github.com/repos/screwdriver-cd/launcher/languages","stargazers_url":"https://api.github.com/repos/screwdriver-cd/launcher/stargazers","contributors_url":"https://api.github.com/repos/screwdriver-cd/launcher/contributors","subscribers_url":"https://api.github.com/repos/screwdriver-cd/launcher/subscribers","subscription_url":"https://api.github.com/repos/screwdriver-cd/launcher/subscription","commits_url":"https://api.github.com/repos/screwdriver-cd/launcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/screwdriver-cd/launcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/screwdriver-cd/launcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/screwdriver-cd/launcher/contents/{+path}","compare_url":"https://api.github.com/repos/screwdriver-cd/launcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/screwdriver-cd/launcher/merges","archive_url":"https://api.github.com/repos/screwdriver-cd/launcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/screwdriver-cd/launcher/downloads","issues_url":"https://api.github.com/repos/screwdriver-cd/launcher/issues{/number}","pulls_url":"https://api.github.com/repos/screwdriver-cd/launcher/pulls{/number}","milestones_url":"https://api.github.com/repos/screwdriver-cd/launcher/milestones{/number}","notifications_url":"https://api.github.com/repos/screwdriver-cd/launcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/screwdriver-cd/launcher/labels{/name}","releases_url":"https://api.github.com/repos/screwdriver-cd/launcher/releases{/id}","deployments_url":"https://api.github.com/repos/screwdriver-cd/launcher/deployments","created_at":"2016-07-22T20:18:23Z","updated_at":"2018-06-25T04:09:23Z","pushed_at":"2018-06-26T17:35:29Z","git_url":"git://github.com/screwdriver-cd/launcher.git","ssh_url":"git@github.com:screwdriver-cd/launcher.git","clone_url":"https://github.com/screwdriver-cd/launcher.git","svn_url":"https://github.com/screwdriver-cd/launcher","homepage":"https://cd.screwdriver.cd/pipelines/21","size":308,"stargazers_count":8,"watchers_count":8,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":10,"open_issues":2,"watchers":8,"default_branch":"master"}},"base":{"label":"screwdriver-cd:master","ref":"master","sha":"c98fb87a2145afd54f620e55588b29272eebb7ef","user":{"login":"screwdriver-cd","id":19417863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDE3ODYz","avatar_url":"https://avatars0.githubusercontent.com/u/19417863?v=4","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"repo":{"id":63980841,"node_id":"MDEwOlJlcG9zaXRvcnk2Mzk4MDg0MQ==","name":"launcher","full_name":"screwdriver-cd/launcher","owner":{"login":"screwdriver-cd","id":19417863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDE3ODYz","avatar_url":"https://avatars0.githubusercontent.com/u/19417863?v=4","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/screwdriver-cd/launcher","description":"The entrypoint for job launching in Screwdriver","fork":false,"url":"https://api.github.com/repos/screwdriver-cd/launcher","forks_url":"https://api.github.com/repos/screwdriver-cd/launcher/forks","keys_url":"https://api.github.com/repos/screwdriver-cd/launcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/screwdriver-cd/launcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/screwdriver-cd/launcher/teams","hooks_url":"https://api.github.com/repos/screwdriver-cd/launcher/hooks","issue_events_url":"https://api.github.com/repos/screwdriver-cd/launcher/issues/events{/number}","events_url":"https://api.github.com/repos/screwdriver-cd/launcher/events","assignees_url":"https://api.github.com/repos/screwdriver-cd/launcher/assignees{/user}","branches_url":"https://api.github.com/repos/screwdriver-cd/launcher/branches{/branch}","tags_url":"https://api.github.com/repos/screwdriver-cd/launcher/tags","blobs_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/screwdriver-cd/launcher/statuses/{sha}","languages_url":"https://api.github.com/repos/screwdriver-cd/launcher/languages","stargazers_url":"https://api.github.com/repos/screwdriver-cd/launcher/stargazers","contributors_url":"https://api.github.com/repos/screwdriver-cd/launcher/contributors","subscribers_url":"https://api.github.com/repos/screwdriver-cd/launcher/subscribers","subscription_url":"https://api.github.com/repos/screwdriver-cd/launcher/subscription","commits_url":"https://api.github.com/repos/screwdriver-cd/launcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/screwdriver-cd/launcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/screwdriver-cd/launcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/screwdriver-cd/launcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/screwdriver-cd/launcher/contents/{+path}","compare_url":"https://api.github.com/repos/screwdriver-cd/launcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/screwdriver-cd/launcher/merges","archive_url":"https://api.github.com/repos/screwdriver-cd/launcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/screwdriver-cd/launcher/downloads","issues_url":"https://api.github.com/repos/screwdriver-cd/launcher/issues{/number}","pulls_url":"https://api.github.com/repos/screwdriver-cd/launcher/pulls{/number}","milestones_url":"https://api.github.com/repos/screwdriver-cd/launcher/milestones{/number}","notifications_url":"https://api.github.com/repos/screwdriver-cd/launcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/screwdriver-cd/launcher/labels{/name}","releases_url":"https://api.github.com/repos/screwdriver-cd/launcher/releases{/id}","deployments_url":"https://api.github.com/repos/screwdriver-cd/launcher/deployments","created_at":"2016-07-22T20:18:23Z","updated_at":"2018-06-25T04:09:23Z","pushed_at":"2018-06-26T17:35:29Z","git_url":"git://github.com/screwdriver-cd/launcher.git","ssh_url":"git@github.com:screwdriver-cd/launcher.git","clone_url":"https://github.com/screwdriver-cd/launcher.git","svn_url":"https://github.com/screwdriver-cd/launcher","homepage":"https://cd.screwdriver.cd/pipelines/21","size":308,"stargazers_count":8,"watchers_count":8,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":10,"open_issues":2,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/190"},"html":{"href":"https://github.com/screwdriver-cd/launcher/pull/190"},"issue":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/issues/190"},"comments":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/screwdriver-cd/launcher/statuses/416c32ac0e09bf40b7032f1e4c5fb499ec33dc36"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tkyi"}}