{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/samson/pulls/comments/30880910","id":30880910,"diff_hunk":"@@ -101,28 +101,18 @@ def execute!(dir)\n \n     FileUtils.mkdir_p(artifact_cache_dir)\n     @output.write(\"\\n# Executing deploy\\n\")\n-\n-    commands = [\n-      \"export DEPLOYER=#{@job.user.email.shellescape}\",\n-      \"export DEPLOYER_EMAIL=#{@job.user.email.shellescape}\",\n-      \"export DEPLOYER_NAME=#{@job.user.name.shellescape}\",\n-      \"export REVISION=#{@reference.shellescape}\",\n-      \"export TAG=#{(@job.tag || @job.commit).to_s.shellescape}\",\n-      \"export CACHE_DIR=#{artifact_cache_dir}\",\n-      \"cd #{dir}\",\n-      *@job.commands\n-    ]\n+    @output.write(\"# Deploy URL: #{@job.deploy.url}\\n\") if @job.deploy\n \n     payload = {\n       stage: (stage.try(:name) || \"none\"),\n       project: @job.project.name,\n-      command: commands.join(\"\\n\")\n+      command: commands(dir).join(\"\\n\")","path":"app/models/job_execution.rb","position":null,"original_position":21,"commit_id":"4b70e64134c809b3b7d7fc33806c671bf5312003","original_commit_id":"b68e16ae492bee108d28fe1fa5b9fad136d3f7e1","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":"Yea, good call... wasn't liking this smell.","created_at":"2015-05-22T09:25:42Z","updated_at":"2015-05-22T09:25:42Z","html_url":"https://github.com/zendesk/samson/pull/403#discussion_r30880910","pull_request_url":"https://api.github.com/repos/zendesk/samson/pulls/403","_links":{"self":{"href":"https://api.github.com/repos/zendesk/samson/pulls/comments/30880910"},"html":{"href":"https://github.com/zendesk/samson/pull/403#discussion_r30880910"},"pull_request":{"href":"https://api.github.com/repos/zendesk/samson/pulls/403"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/samson/pulls/403","id":35011918,"html_url":"https://github.com/zendesk/samson/pull/403","diff_url":"https://github.com/zendesk/samson/pull/403.diff","patch_url":"https://github.com/zendesk/samson/pull/403.patch","issue_url":"https://api.github.com/repos/zendesk/samson/issues/403","number":403,"state":"open","locked":false,"title":"Pass Deploy_groups into Deploy script for use.","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":"To further the integration of deploy groups, this passes down the list of affected deploy_groups in an environment variable $DEPLOY_GROUPS so the script can access it.\r\n\r\n![screen shot 2015-05-08 at 15 05 18](https://cloud.githubusercontent.com/assets/515143/7537889/fce5c204-f593-11e4-9c65-c93c2a7f1684.png)\r\n\r\n----------------------\r\n\r\n![pod1_deploy__succeeded__-_project0](https://cloud.githubusercontent.com/assets/515143/7537890/fe9d44e6-f593-11e4-9232-8dd6a3bdd49d.png)\r\n\r\n\r\n/cc @zendesk/runway @zendesk/samson \r\n\r\n### References\r\n - Jira link:\r\n\r\n### Risks\r\n - None","created_at":"2015-05-08T14:08:45Z","updated_at":"2015-05-22T09:25:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccc9f77fa36b2a55c4ef3bf71fbf7e9afe7ad684","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/samson/pulls/403/commits","review_comments_url":"https://api.github.com/repos/zendesk/samson/pulls/403/comments","review_comment_url":"https://api.github.com/repos/zendesk/samson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/samson/issues/403/comments","statuses_url":"https://api.github.com/repos/zendesk/samson/statuses/4b70e64134c809b3b7d7fc33806c671bf5312003","head":{"label":"zendesk:shender/pass_deploy_groups_into_job","ref":"shender/pass_deploy_groups_into_job","sha":"4b70e64134c809b3b7d7fc33806c671bf5312003","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-05-21T18:50:53Z","pushed_at":"2015-05-22T09:22:50Z","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":133844,"stargazers_count":419,"watchers_count":419,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":35,"forks":51,"open_issues":35,"watchers":419,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"1d3deedc62e466dbf8f34b8d6f904ddb6cbe3572","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-05-21T18:50:53Z","pushed_at":"2015-05-22T09:22:50Z","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":133844,"stargazers_count":419,"watchers_count":419,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":35,"forks":51,"open_issues":35,"watchers":419,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/samson/pulls/403"},"html":{"href":"https://github.com/zendesk/samson/pull/403"},"issue":{"href":"https://api.github.com/repos/zendesk/samson/issues/403"},"comments":{"href":"https://api.github.com/repos/zendesk/samson/issues/403/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/samson/pulls/403/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/samson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/samson/pulls/403/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/samson/statuses/4b70e64134c809b3b7d7fc33806c671bf5312003"}}}}