{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/testgrid/pulls/comments/188508295","pull_request_review_id":120499030,"id":188508295,"diff_hunk":"@@ -66,11 +69,16 @@ public abstract void init(String testsLocation, String testName, TestScenario te\n      * @return The response of script execution.\n      * @throws TestAutomationException Throws exception when there is an error executing the script.\n      */\n-    public String executeEnvironmentScript(Path script, DeploymentCreationResult deploymentCreationResult)\n+    public int executeEnvironmentScript(Path script, DeploymentCreationResult deploymentCreationResult)\n             throws TestAutomationException {\n         try {\n-            return TestGridUtil.executeCommand(\"bash \" + script.toString(), null,\n-                    deploymentCreationResult);\n+            ShellExecutor shellExecutor = new ShellExecutor();\n+            Map<String, String> environment = new HashMap<>();\n+\n+            for (Host host : deploymentCreationResult.getHosts()) {\n+                environment.put(host.getLabel(), host.getIp());","path":"automation/src/main/java/org/wso2/testgrid/automation/executor/TestExecutor.java","position":30,"original_position":30,"commit_id":"e4af8be15b4e0c86c6ddb5c9fb0ac1f5b4b71da5","original_commit_id":"95461821f1e864e3aa301ae487a53b87e5d9d83a","user":{"login":"azinneera","id":18344003,"avatar_url":"https://avatars3.githubusercontent.com/u/18344003?v=4","gravatar_id":"","url":"https://api.github.com/users/azinneera","html_url":"https://github.com/azinneera","followers_url":"https://api.github.com/users/azinneera/followers","following_url":"https://api.github.com/users/azinneera/following{/other_user}","gists_url":"https://api.github.com/users/azinneera/gists{/gist_id}","starred_url":"https://api.github.com/users/azinneera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azinneera/subscriptions","organizations_url":"https://api.github.com/users/azinneera/orgs","repos_url":"https://api.github.com/users/azinneera/repos","events_url":"https://api.github.com/users/azinneera/events{/privacy}","received_events_url":"https://api.github.com/users/azinneera/received_events","type":"User","site_admin":false},"body":"Yes, the CF script will output some hosts.","created_at":"2018-05-16T05:44:20Z","updated_at":"2018-05-16T05:44:20Z","html_url":"https://github.com/wso2/testgrid/pull/756#discussion_r188508295","pull_request_url":"https://api.github.com/repos/wso2/testgrid/pulls/756","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wso2/testgrid/pulls/comments/188508295"},"html":{"href":"https://github.com/wso2/testgrid/pull/756#discussion_r188508295"},"pull_request":{"href":"https://api.github.com/repos/wso2/testgrid/pulls/756"}},"in_reply_to_id":188157906},"pull_request":{"url":"https://api.github.com/repos/wso2/testgrid/pulls/756","id":187719531,"html_url":"https://github.com/wso2/testgrid/pull/756","diff_url":"https://github.com/wso2/testgrid/pull/756.diff","patch_url":"https://github.com/wso2/testgrid/pull/756.patch","issue_url":"https://api.github.com/repos/wso2/testgrid/issues/756","number":756,"state":"open","locked":false,"title":"Support execution of init and cleanup scripts to provision infrastructure required for samples","user":{"login":"azinneera","id":18344003,"avatar_url":"https://avatars3.githubusercontent.com/u/18344003?v=4","gravatar_id":"","url":"https://api.github.com/users/azinneera","html_url":"https://github.com/azinneera","followers_url":"https://api.github.com/users/azinneera/followers","following_url":"https://api.github.com/users/azinneera/following{/other_user}","gists_url":"https://api.github.com/users/azinneera/gists{/gist_id}","starred_url":"https://api.github.com/users/azinneera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azinneera/subscriptions","organizations_url":"https://api.github.com/users/azinneera/orgs","repos_url":"https://api.github.com/users/azinneera/repos","events_url":"https://api.github.com/users/azinneera/events{/privacy}","received_events_url":"https://api.github.com/users/azinneera/received_events","type":"User","site_admin":false},"body":"**Purpose**\r\n\r\nStandardizes the provision of infrastructure need to execute scenario tests through two scripts. \r\nResolves #725\r\n\r\n**Goals**\r\n\r\nProvide a standardized approach to provision infrastructure required for scenario tests. Eg. tomcat deployment for IS scenarios, MSF4J services for APIM scenarios\r\n\r\n**Approach**\r\n\r\nSupport running a `init.sh` before running scenarios to provision necessary infrastructure and a `cleanup.sh` after running scenarios to destroy provisioned infrastructure.\r\n\r\nThe scenario test repos should contains these two scripts if additional infrastructure is required and this should be specified with `scripts` element in testgrid.yaml in the same repo as follows.\r\n```\r\n\r\nscenarioConfig:\r\n  scenarios:\r\n  -\r\n    name: scenario03\r\n    description: 'App Development with APIs'\r\n    dir: scenario03\r\n  -\r\n    name: scenario04\r\n    description: 'API Lifecycle Management'\r\n    dir: scenario04\r\n  scripts:\r\n  -\r\n    file: \"init.sh\"\r\n    phase: CREATE\r\n  -\r\n    file: \"cleanup.sh\"\r\n    phase: DESTROY\r\n```\r\n\r\n**Security checks**\r\n - Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes\r\n - Ran FindSecurityBugs plugin and verified report? yes\r\n - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes","created_at":"2018-05-14T04:50:26Z","updated_at":"2018-05-16T05:44:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d4a1a8a776bcf8d6a6d021be9b9b178b62e8eaa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/testgrid/pulls/756/commits","review_comments_url":"https://api.github.com/repos/wso2/testgrid/pulls/756/comments","review_comment_url":"https://api.github.com/repos/wso2/testgrid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/testgrid/issues/756/comments","statuses_url":"https://api.github.com/repos/wso2/testgrid/statuses/e4af8be15b4e0c86c6ddb5c9fb0ac1f5b4b71da5","head":{"label":"azinneera:config-sets","ref":"config-sets","sha":"e4af8be15b4e0c86c6ddb5c9fb0ac1f5b4b71da5","user":{"login":"azinneera","id":18344003,"avatar_url":"https://avatars3.githubusercontent.com/u/18344003?v=4","gravatar_id":"","url":"https://api.github.com/users/azinneera","html_url":"https://github.com/azinneera","followers_url":"https://api.github.com/users/azinneera/followers","following_url":"https://api.github.com/users/azinneera/following{/other_user}","gists_url":"https://api.github.com/users/azinneera/gists{/gist_id}","starred_url":"https://api.github.com/users/azinneera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azinneera/subscriptions","organizations_url":"https://api.github.com/users/azinneera/orgs","repos_url":"https://api.github.com/users/azinneera/repos","events_url":"https://api.github.com/users/azinneera/events{/privacy}","received_events_url":"https://api.github.com/users/azinneera/received_events","type":"User","site_admin":false},"repo":{"id":108869875,"name":"wso2-test-grid","full_name":"azinneera/wso2-test-grid","owner":{"login":"azinneera","id":18344003,"avatar_url":"https://avatars3.githubusercontent.com/u/18344003?v=4","gravatar_id":"","url":"https://api.github.com/users/azinneera","html_url":"https://github.com/azinneera","followers_url":"https://api.github.com/users/azinneera/followers","following_url":"https://api.github.com/users/azinneera/following{/other_user}","gists_url":"https://api.github.com/users/azinneera/gists{/gist_id}","starred_url":"https://api.github.com/users/azinneera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azinneera/subscriptions","organizations_url":"https://api.github.com/users/azinneera/orgs","repos_url":"https://api.github.com/users/azinneera/repos","events_url":"https://api.github.com/users/azinneera/events{/privacy}","received_events_url":"https://api.github.com/users/azinneera/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/azinneera/wso2-test-grid","description":null,"fork":true,"url":"https://api.github.com/repos/azinneera/wso2-test-grid","forks_url":"https://api.github.com/repos/azinneera/wso2-test-grid/forks","keys_url":"https://api.github.com/repos/azinneera/wso2-test-grid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azinneera/wso2-test-grid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azinneera/wso2-test-grid/teams","hooks_url":"https://api.github.com/repos/azinneera/wso2-test-grid/hooks","issue_events_url":"https://api.github.com/repos/azinneera/wso2-test-grid/issues/events{/number}","events_url":"https://api.github.com/repos/azinneera/wso2-test-grid/events","assignees_url":"https://api.github.com/repos/azinneera/wso2-test-grid/assignees{/user}","branches_url":"https://api.github.com/repos/azinneera/wso2-test-grid/branches{/branch}","tags_url":"https://api.github.com/repos/azinneera/wso2-test-grid/tags","blobs_url":"https://api.github.com/repos/azinneera/wso2-test-grid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azinneera/wso2-test-grid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azinneera/wso2-test-grid/git/refs{/sha}","trees_url":"https://api.github.com/repos/azinneera/wso2-test-grid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azinneera/wso2-test-grid/statuses/{sha}","languages_url":"https://api.github.com/repos/azinneera/wso2-test-grid/languages","stargazers_url":"https://api.github.com/repos/azinneera/wso2-test-grid/stargazers","contributors_url":"https://api.github.com/repos/azinneera/wso2-test-grid/contributors","subscribers_url":"https://api.github.com/repos/azinneera/wso2-test-grid/subscribers","subscription_url":"https://api.github.com/repos/azinneera/wso2-test-grid/subscription","commits_url":"https://api.github.com/repos/azinneera/wso2-test-grid/commits{/sha}","git_commits_url":"https://api.github.com/repos/azinneera/wso2-test-grid/git/commits{/sha}","comments_url":"https://api.github.com/repos/azinneera/wso2-test-grid/comments{/number}","issue_comment_url":"https://api.github.com/repos/azinneera/wso2-test-grid/issues/comments{/number}","contents_url":"https://api.github.com/repos/azinneera/wso2-test-grid/contents/{+path}","compare_url":"https://api.github.com/repos/azinneera/wso2-test-grid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azinneera/wso2-test-grid/merges","archive_url":"https://api.github.com/repos/azinneera/wso2-test-grid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azinneera/wso2-test-grid/downloads","issues_url":"https://api.github.com/repos/azinneera/wso2-test-grid/issues{/number}","pulls_url":"https://api.github.com/repos/azinneera/wso2-test-grid/pulls{/number}","milestones_url":"https://api.github.com/repos/azinneera/wso2-test-grid/milestones{/number}","notifications_url":"https://api.github.com/repos/azinneera/wso2-test-grid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azinneera/wso2-test-grid/labels{/name}","releases_url":"https://api.github.com/repos/azinneera/wso2-test-grid/releases{/id}","deployments_url":"https://api.github.com/repos/azinneera/wso2-test-grid/deployments","created_at":"2017-10-30T15:25:59Z","updated_at":"2018-01-30T14:57:48Z","pushed_at":"2018-05-16T05:10:09Z","git_url":"git://github.com/azinneera/wso2-test-grid.git","ssh_url":"git@github.com:azinneera/wso2-test-grid.git","clone_url":"https://github.com/azinneera/wso2-test-grid.git","svn_url":"https://github.com/azinneera/wso2-test-grid","homepage":null,"size":28224,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"c10c4e48c053839cf5df832cbe791ea8b2be2cb1","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":108240819,"name":"testgrid","full_name":"wso2/testgrid","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/testgrid","description":"TestGrid provides the enterprise customers confidence on the products and updates WSO2 ship.","fork":false,"url":"https://api.github.com/repos/wso2/testgrid","forks_url":"https://api.github.com/repos/wso2/testgrid/forks","keys_url":"https://api.github.com/repos/wso2/testgrid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/testgrid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/testgrid/teams","hooks_url":"https://api.github.com/repos/wso2/testgrid/hooks","issue_events_url":"https://api.github.com/repos/wso2/testgrid/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/testgrid/events","assignees_url":"https://api.github.com/repos/wso2/testgrid/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/testgrid/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/testgrid/tags","blobs_url":"https://api.github.com/repos/wso2/testgrid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/testgrid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/testgrid/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/testgrid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/testgrid/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/testgrid/languages","stargazers_url":"https://api.github.com/repos/wso2/testgrid/stargazers","contributors_url":"https://api.github.com/repos/wso2/testgrid/contributors","subscribers_url":"https://api.github.com/repos/wso2/testgrid/subscribers","subscription_url":"https://api.github.com/repos/wso2/testgrid/subscription","commits_url":"https://api.github.com/repos/wso2/testgrid/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/testgrid/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/testgrid/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/testgrid/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/testgrid/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/testgrid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/testgrid/merges","archive_url":"https://api.github.com/repos/wso2/testgrid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/testgrid/downloads","issues_url":"https://api.github.com/repos/wso2/testgrid/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/testgrid/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/testgrid/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/testgrid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/testgrid/labels{/name}","releases_url":"https://api.github.com/repos/wso2/testgrid/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/testgrid/deployments","created_at":"2017-10-25T08:21:00Z","updated_at":"2018-05-16T04:17:27Z","pushed_at":"2018-05-16T05:10:11Z","git_url":"git://github.com/wso2/testgrid.git","ssh_url":"git@github.com:wso2/testgrid.git","clone_url":"https://github.com/wso2/testgrid.git","svn_url":"https://github.com/wso2/testgrid","homepage":"","size":28191,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":88,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":14,"open_issues":88,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/testgrid/pulls/756"},"html":{"href":"https://github.com/wso2/testgrid/pull/756"},"issue":{"href":"https://api.github.com/repos/wso2/testgrid/issues/756"},"comments":{"href":"https://api.github.com/repos/wso2/testgrid/issues/756/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/testgrid/pulls/756/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/testgrid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/testgrid/pulls/756/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/testgrid/statuses/e4af8be15b4e0c86c6ddb5c9fb0ac1f5b4b71da5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"azinneera"}}