{"action":"created","comment":{"url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/comments/158733083","pull_request_review_id":85582566,"id":158733083,"diff_hunk":"@@ -0,0 +1,225 @@\n+package command\n+\n+import (\n+\t\"context\"\n+\t\"io\"\n+\t\"os\"\n+\t\"strconv\"\n+\n+\t\"github.com/evergreen-ci/evergreen/model\"\n+\t\"github.com/evergreen-ci/evergreen/rest/client\"\n+\t\"github.com/evergreen-ci/evergreen/subprocess\"\n+\t\"github.com/evergreen-ci/evergreen/util\"\n+\t\"github.com/google/shlex\"\n+\t\"github.com/mitchellh/mapstructure\"\n+\t\"github.com/mongodb/grip\"\n+\t\"github.com/mongodb/grip/level\"\n+\t\"github.com/mongodb/grip/message\"\n+\t\"github.com/pkg/errors\"\n+)\n+\n+type simpleExec struct {\n+\tCommandName string            `mapstructure:\"command_name\"`\n+\tArgs        []string          `mapstructure:\"args\"`\n+\tEnv         map[string]string `mapstructure:\"env\"`\n+\n+\tCommand string `mapstructure:\"command\"`\n+\n+\t// Background, if set to true, prevents shell code/output from\n+\t// waiting for the script to complete and immediately returns\n+\t// to the caller\n+\tBackground bool `mapstructure:\"background\"`\n+\n+\t// Silent, if set to true, prevents shell code/output from being\n+\t// logged to the agent's task logs. This can be used to avoid\n+\t// exposing sensitive expansion parameters and keys.\n+\tSilent bool `mapstructure:\"silent\"`\n+\n+\t// SystemLog if set will write the shell command's output to the system logs, instead of the\n+\t// task logs. This can be used to collect diagnostic data in the background of a running task.\n+\tSystemLog bool `mapstructure:\"system_log\"`\n+\n+\t// WorkingDir is the working directory to start the shell in.\n+\tWorkingDir string `mapstructure:\"working_dir\"`\n+\n+\t// IgnoreStandardOutput and IgnoreStandardError allow users to\n+\t// elect to ignore either standard out and/or standard output.\n+\tIgnoreStandardOutput bool `mapstructure:\"ignore_standard_out\"`\n+\tIgnoreStandardError  bool `mapstructure:\"ignore_standard_error\"`\n+\n+\t// RedirectStandardErrorToOutput allows you to capture\n+\t// standard error in the same stream as standard output. This\n+\t// improves the synchronization of these streams.\n+\tRedirectStandardErrorToOutput bool `mapstructure:\"redirect_standard_error_to_output\"`\n+\n+\t// ContinueOnError determines whether or not a failed return code\n+\t// should cause the task to be marked as failed. Setting this to true\n+\t// allows following commands to execute even if this shell command fails.\n+\tContinueOnError bool `mapstructure:\"continue_on_err\"`\n+\n+\tbase\n+}\n+\n+func simpleExecFactory() Command   { return &simpleExec{} }\n+func (c *simpleExec) Name() string { return \"simple.exec\" }\n+\n+func (c *simpleExec) ParseParams(params map[string]interface{}) error {\n+\terr := mapstructure.Decode(params, c)\n+\tif err != nil {\n+\t\treturn errors.Wrapf(err, \"error decoding %v params\", c.Name())","path":"command/exec.go","position":69,"original_position":69,"commit_id":"839415c665d81f99da78cbfaa2c42538dd3dc9c6","original_commit_id":"839415c665d81f99da78cbfaa2c42538dd3dc9c6","user":{"login":"bsamek","id":624531,"avatar_url":"https://avatars1.githubusercontent.com/u/624531?v=4","gravatar_id":"","url":"https://api.github.com/users/bsamek","html_url":"https://github.com/bsamek","followers_url":"https://api.github.com/users/bsamek/followers","following_url":"https://api.github.com/users/bsamek/following{/other_user}","gists_url":"https://api.github.com/users/bsamek/gists{/gist_id}","starred_url":"https://api.github.com/users/bsamek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsamek/subscriptions","organizations_url":"https://api.github.com/users/bsamek/orgs","repos_url":"https://api.github.com/users/bsamek/repos","events_url":"https://api.github.com/users/bsamek/events{/privacy}","received_events_url":"https://api.github.com/users/bsamek/received_events","type":"User","site_admin":false},"body":"`%s`","created_at":"2017-12-26T19:12:48Z","updated_at":"2017-12-26T19:26:26Z","html_url":"https://github.com/evergreen-ci/evergreen/pull/506#discussion_r158733083","pull_request_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/506","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/comments/158733083"},"html":{"href":"https://github.com/evergreen-ci/evergreen/pull/506#discussion_r158733083"},"pull_request":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/506"}}},"pull_request":{"url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/506","id":159985982,"html_url":"https://github.com/evergreen-ci/evergreen/pull/506","diff_url":"https://github.com/evergreen-ci/evergreen/pull/506.diff","patch_url":"https://github.com/evergreen-ci/evergreen/pull/506.patch","issue_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues/506","number":506,"state":"open","locked":false,"title":"EVG-2401: new simple.exec agent command","user":{"login":"tychoish","id":17534,"avatar_url":"https://avatars1.githubusercontent.com/u/17534?v=4","gravatar_id":"","url":"https://api.github.com/users/tychoish","html_url":"https://github.com/tychoish","followers_url":"https://api.github.com/users/tychoish/followers","following_url":"https://api.github.com/users/tychoish/following{/other_user}","gists_url":"https://api.github.com/users/tychoish/gists{/gist_id}","starred_url":"https://api.github.com/users/tychoish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tychoish/subscriptions","organizations_url":"https://api.github.com/users/tychoish/orgs","repos_url":"https://api.github.com/users/tychoish/repos","events_url":"https://api.github.com/users/tychoish/events{/privacy}","received_events_url":"https://api.github.com/users/tychoish/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-24T02:13:29Z","updated_at":"2017-12-26T19:26:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47b5fac401d717a8cec4f7e59ef7d7d7d1309eb1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/506/commits","review_comments_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/506/comments","review_comment_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues/506/comments","statuses_url":"https://api.github.com/repos/evergreen-ci/evergreen/statuses/839415c665d81f99da78cbfaa2c42538dd3dc9c6","head":{"label":"tychoish:EVG-2401-simple-exec","ref":"EVG-2401-simple-exec","sha":"839415c665d81f99da78cbfaa2c42538dd3dc9c6","user":{"login":"tychoish","id":17534,"avatar_url":"https://avatars1.githubusercontent.com/u/17534?v=4","gravatar_id":"","url":"https://api.github.com/users/tychoish","html_url":"https://github.com/tychoish","followers_url":"https://api.github.com/users/tychoish/followers","following_url":"https://api.github.com/users/tychoish/following{/other_user}","gists_url":"https://api.github.com/users/tychoish/gists{/gist_id}","starred_url":"https://api.github.com/users/tychoish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tychoish/subscriptions","organizations_url":"https://api.github.com/users/tychoish/orgs","repos_url":"https://api.github.com/users/tychoish/repos","events_url":"https://api.github.com/users/tychoish/events{/privacy}","received_events_url":"https://api.github.com/users/tychoish/received_events","type":"User","site_admin":false},"repo":{"id":41165348,"name":"evergreen","full_name":"tychoish/evergreen","owner":{"login":"tychoish","id":17534,"avatar_url":"https://avatars1.githubusercontent.com/u/17534?v=4","gravatar_id":"","url":"https://api.github.com/users/tychoish","html_url":"https://github.com/tychoish","followers_url":"https://api.github.com/users/tychoish/followers","following_url":"https://api.github.com/users/tychoish/following{/other_user}","gists_url":"https://api.github.com/users/tychoish/gists{/gist_id}","starred_url":"https://api.github.com/users/tychoish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tychoish/subscriptions","organizations_url":"https://api.github.com/users/tychoish/orgs","repos_url":"https://api.github.com/users/tychoish/repos","events_url":"https://api.github.com/users/tychoish/events{/privacy}","received_events_url":"https://api.github.com/users/tychoish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tychoish/evergreen","description":"A Distributed Continuous Integration System from MongoDB","fork":true,"url":"https://api.github.com/repos/tychoish/evergreen","forks_url":"https://api.github.com/repos/tychoish/evergreen/forks","keys_url":"https://api.github.com/repos/tychoish/evergreen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tychoish/evergreen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tychoish/evergreen/teams","hooks_url":"https://api.github.com/repos/tychoish/evergreen/hooks","issue_events_url":"https://api.github.com/repos/tychoish/evergreen/issues/events{/number}","events_url":"https://api.github.com/repos/tychoish/evergreen/events","assignees_url":"https://api.github.com/repos/tychoish/evergreen/assignees{/user}","branches_url":"https://api.github.com/repos/tychoish/evergreen/branches{/branch}","tags_url":"https://api.github.com/repos/tychoish/evergreen/tags","blobs_url":"https://api.github.com/repos/tychoish/evergreen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tychoish/evergreen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tychoish/evergreen/git/refs{/sha}","trees_url":"https://api.github.com/repos/tychoish/evergreen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tychoish/evergreen/statuses/{sha}","languages_url":"https://api.github.com/repos/tychoish/evergreen/languages","stargazers_url":"https://api.github.com/repos/tychoish/evergreen/stargazers","contributors_url":"https://api.github.com/repos/tychoish/evergreen/contributors","subscribers_url":"https://api.github.com/repos/tychoish/evergreen/subscribers","subscription_url":"https://api.github.com/repos/tychoish/evergreen/subscription","commits_url":"https://api.github.com/repos/tychoish/evergreen/commits{/sha}","git_commits_url":"https://api.github.com/repos/tychoish/evergreen/git/commits{/sha}","comments_url":"https://api.github.com/repos/tychoish/evergreen/comments{/number}","issue_comment_url":"https://api.github.com/repos/tychoish/evergreen/issues/comments{/number}","contents_url":"https://api.github.com/repos/tychoish/evergreen/contents/{+path}","compare_url":"https://api.github.com/repos/tychoish/evergreen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tychoish/evergreen/merges","archive_url":"https://api.github.com/repos/tychoish/evergreen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tychoish/evergreen/downloads","issues_url":"https://api.github.com/repos/tychoish/evergreen/issues{/number}","pulls_url":"https://api.github.com/repos/tychoish/evergreen/pulls{/number}","milestones_url":"https://api.github.com/repos/tychoish/evergreen/milestones{/number}","notifications_url":"https://api.github.com/repos/tychoish/evergreen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tychoish/evergreen/labels{/name}","releases_url":"https://api.github.com/repos/tychoish/evergreen/releases{/id}","deployments_url":"https://api.github.com/repos/tychoish/evergreen/deployments","created_at":"2015-08-21T16:13:58Z","updated_at":"2016-11-03T21:15:49Z","pushed_at":"2017-12-26T02:08:29Z","git_url":"git://github.com/tychoish/evergreen.git","ssh_url":"git@github.com:tychoish/evergreen.git","clone_url":"https://github.com/tychoish/evergreen.git","svn_url":"https://github.com/tychoish/evergreen","homepage":"http://evergreen.mongodb.com","size":40411,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"evergreen-ci:master","ref":"master","sha":"8c2cd3ed5159e60d45e3204c4129168f18de01a0","user":{"login":"evergreen-ci","id":10089490,"avatar_url":"https://avatars3.githubusercontent.com/u/10089490?v=4","gravatar_id":"","url":"https://api.github.com/users/evergreen-ci","html_url":"https://github.com/evergreen-ci","followers_url":"https://api.github.com/users/evergreen-ci/followers","following_url":"https://api.github.com/users/evergreen-ci/following{/other_user}","gists_url":"https://api.github.com/users/evergreen-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/evergreen-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evergreen-ci/subscriptions","organizations_url":"https://api.github.com/users/evergreen-ci/orgs","repos_url":"https://api.github.com/users/evergreen-ci/repos","events_url":"https://api.github.com/users/evergreen-ci/events{/privacy}","received_events_url":"https://api.github.com/users/evergreen-ci/received_events","type":"Organization","site_admin":false},"repo":{"id":36385798,"name":"evergreen","full_name":"evergreen-ci/evergreen","owner":{"login":"evergreen-ci","id":10089490,"avatar_url":"https://avatars3.githubusercontent.com/u/10089490?v=4","gravatar_id":"","url":"https://api.github.com/users/evergreen-ci","html_url":"https://github.com/evergreen-ci","followers_url":"https://api.github.com/users/evergreen-ci/followers","following_url":"https://api.github.com/users/evergreen-ci/following{/other_user}","gists_url":"https://api.github.com/users/evergreen-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/evergreen-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evergreen-ci/subscriptions","organizations_url":"https://api.github.com/users/evergreen-ci/orgs","repos_url":"https://api.github.com/users/evergreen-ci/repos","events_url":"https://api.github.com/users/evergreen-ci/events{/privacy}","received_events_url":"https://api.github.com/users/evergreen-ci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/evergreen-ci/evergreen","description":"A Distributed Continuous Integration System from MongoDB","fork":false,"url":"https://api.github.com/repos/evergreen-ci/evergreen","forks_url":"https://api.github.com/repos/evergreen-ci/evergreen/forks","keys_url":"https://api.github.com/repos/evergreen-ci/evergreen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evergreen-ci/evergreen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evergreen-ci/evergreen/teams","hooks_url":"https://api.github.com/repos/evergreen-ci/evergreen/hooks","issue_events_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues/events{/number}","events_url":"https://api.github.com/repos/evergreen-ci/evergreen/events","assignees_url":"https://api.github.com/repos/evergreen-ci/evergreen/assignees{/user}","branches_url":"https://api.github.com/repos/evergreen-ci/evergreen/branches{/branch}","tags_url":"https://api.github.com/repos/evergreen-ci/evergreen/tags","blobs_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/refs{/sha}","trees_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evergreen-ci/evergreen/statuses/{sha}","languages_url":"https://api.github.com/repos/evergreen-ci/evergreen/languages","stargazers_url":"https://api.github.com/repos/evergreen-ci/evergreen/stargazers","contributors_url":"https://api.github.com/repos/evergreen-ci/evergreen/contributors","subscribers_url":"https://api.github.com/repos/evergreen-ci/evergreen/subscribers","subscription_url":"https://api.github.com/repos/evergreen-ci/evergreen/subscription","commits_url":"https://api.github.com/repos/evergreen-ci/evergreen/commits{/sha}","git_commits_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/commits{/sha}","comments_url":"https://api.github.com/repos/evergreen-ci/evergreen/comments{/number}","issue_comment_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues/comments{/number}","contents_url":"https://api.github.com/repos/evergreen-ci/evergreen/contents/{+path}","compare_url":"https://api.github.com/repos/evergreen-ci/evergreen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evergreen-ci/evergreen/merges","archive_url":"https://api.github.com/repos/evergreen-ci/evergreen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evergreen-ci/evergreen/downloads","issues_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues{/number}","pulls_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls{/number}","milestones_url":"https://api.github.com/repos/evergreen-ci/evergreen/milestones{/number}","notifications_url":"https://api.github.com/repos/evergreen-ci/evergreen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evergreen-ci/evergreen/labels{/name}","releases_url":"https://api.github.com/repos/evergreen-ci/evergreen/releases{/id}","deployments_url":"https://api.github.com/repos/evergreen-ci/evergreen/deployments","created_at":"2015-05-27T18:03:09Z","updated_at":"2017-12-21T03:01:00Z","pushed_at":"2017-12-26T19:18:10Z","git_url":"git://github.com/evergreen-ci/evergreen.git","ssh_url":"git@github.com:evergreen-ci/evergreen.git","clone_url":"https://github.com/evergreen-ci/evergreen.git","svn_url":"https://github.com/evergreen-ci/evergreen","homepage":"http://evergreen.mongodb.com","size":39832,"stargazers_count":148,"watchers_count":148,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":39,"open_issues":5,"watchers":148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/506"},"html":{"href":"https://github.com/evergreen-ci/evergreen/pull/506"},"issue":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/issues/506"},"comments":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/issues/506/comments"},"review_comments":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/506/comments"},"review_comment":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/506/commits"},"statuses":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/statuses/839415c665d81f99da78cbfaa2c42538dd3dc9c6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"bsamek"}}