{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/comments/40643977","id":40643977,"diff_hunk":"@@ -37,4 +47,20 @@ public WorkflowJob(Injector injector, URL url, String name) {\n     public final Control script = control(\"/definition/script\");\n     public final Control sandbox = control(\"/definition/sandbox\");\n \n+    public String copyResourceStep(String filePath) {\n+        final Resource res = resource(filePath);\n+        try (InputStream in = res.asInputStream()) {\n+            ByteArrayOutputStream out = new ByteArrayOutputStream();\n+\n+            try (OutputStream gz = new GZIPOutputStream(out)) {\n+                IOUtils.copy(in, gz);\n+            }\n+\n+            return String.format(\"sh '''base64 --decode << ENDOFFILE | gunzip > %1$s \\n%2$s\\nENDOFFILE'''\\n\",","path":"src/main/java/org/jenkinsci/test/acceptance/po/WorkflowJob.java","position":31,"original_position":31,"commit_id":"acfac5d57e85a773ca5a3dbc0712f91c961fb1d7","original_commit_id":"acfac5d57e85a773ca5a3dbc0712f91c961fb1d7","user":{"login":"olivergondza","id":206841,"avatar_url":"https://avatars.githubusercontent.com/u/206841?v=3","gravatar_id":"","url":"https://api.github.com/users/olivergondza","html_url":"https://github.com/olivergondza","followers_url":"https://api.github.com/users/olivergondza/followers","following_url":"https://api.github.com/users/olivergondza/following{/other_user}","gists_url":"https://api.github.com/users/olivergondza/gists{/gist_id}","starred_url":"https://api.github.com/users/olivergondza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivergondza/subscriptions","organizations_url":"https://api.github.com/users/olivergondza/orgs","repos_url":"https://api.github.com/users/olivergondza/repos","events_url":"https://api.github.com/users/olivergondza/events{/privacy}","received_events_url":"https://api.github.com/users/olivergondza/received_events","type":"User","site_admin":false},"body":"@amuniz, sorry, my point was to keep the shell magic on one place. So the both methods will delegate to another one that will assemble the actual script.","created_at":"2015-09-29T08:04:12Z","updated_at":"2015-09-29T08:04:12Z","html_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/40#discussion_r40643977","pull_request_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/comments/40643977"},"html":{"href":"https://github.com/jenkinsci/acceptance-test-harness/pull/40#discussion_r40643977"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/40","id":46099813,"html_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/40","diff_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/40.diff","patch_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/40.patch","issue_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/40","number":40,"state":"open","locked":false,"title":"[JENKINS-30390] Workflow job using Analysis Collector","user":{"login":"amuniz","id":1017585,"avatar_url":"https://avatars.githubusercontent.com/u/1017585?v=3","gravatar_id":"","url":"https://api.github.com/users/amuniz","html_url":"https://github.com/amuniz","followers_url":"https://api.github.com/users/amuniz/followers","following_url":"https://api.github.com/users/amuniz/following{/other_user}","gists_url":"https://api.github.com/users/amuniz/gists{/gist_id}","starred_url":"https://api.github.com/users/amuniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amuniz/subscriptions","organizations_url":"https://api.github.com/users/amuniz/orgs","repos_url":"https://api.github.com/users/amuniz/repos","events_url":"https://api.github.com/users/amuniz/events{/privacy}","received_events_url":"https://api.github.com/users/amuniz/received_events","type":"User","site_admin":false},"body":"Inspired by the hidden problem found in [JENKINS-30390](https://issues.jenkins-ci.org/browse/JENKINS-30390).\r\n\r\n@reviewbybees ","created_at":"2015-09-27T11:42:20Z","updated_at":"2015-09-29T08:04:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f107a28757c47255e26836beea7fa94c0d7ac817","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/40/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/40/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/40/comments","statuses_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/statuses/acfac5d57e85a773ca5a3dbc0712f91c961fb1d7","head":{"label":"amuniz:JENKINS-30390","ref":"JENKINS-30390","sha":"acfac5d57e85a773ca5a3dbc0712f91c961fb1d7","user":{"login":"amuniz","id":1017585,"avatar_url":"https://avatars.githubusercontent.com/u/1017585?v=3","gravatar_id":"","url":"https://api.github.com/users/amuniz","html_url":"https://github.com/amuniz","followers_url":"https://api.github.com/users/amuniz/followers","following_url":"https://api.github.com/users/amuniz/following{/other_user}","gists_url":"https://api.github.com/users/amuniz/gists{/gist_id}","starred_url":"https://api.github.com/users/amuniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amuniz/subscriptions","organizations_url":"https://api.github.com/users/amuniz/orgs","repos_url":"https://api.github.com/users/amuniz/repos","events_url":"https://api.github.com/users/amuniz/events{/privacy}","received_events_url":"https://api.github.com/users/amuniz/received_events","type":"User","site_admin":false},"repo":{"id":40722842,"name":"acceptance-test-harness","full_name":"amuniz/acceptance-test-harness","owner":{"login":"amuniz","id":1017585,"avatar_url":"https://avatars.githubusercontent.com/u/1017585?v=3","gravatar_id":"","url":"https://api.github.com/users/amuniz","html_url":"https://github.com/amuniz","followers_url":"https://api.github.com/users/amuniz/followers","following_url":"https://api.github.com/users/amuniz/following{/other_user}","gists_url":"https://api.github.com/users/amuniz/gists{/gist_id}","starred_url":"https://api.github.com/users/amuniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amuniz/subscriptions","organizations_url":"https://api.github.com/users/amuniz/orgs","repos_url":"https://api.github.com/users/amuniz/repos","events_url":"https://api.github.com/users/amuniz/events{/privacy}","received_events_url":"https://api.github.com/users/amuniz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amuniz/acceptance-test-harness","description":"Attempted port from selenium-tests to Java","fork":true,"url":"https://api.github.com/repos/amuniz/acceptance-test-harness","forks_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/forks","keys_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/teams","hooks_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/hooks","issue_events_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/issues/events{/number}","events_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/events","assignees_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/assignees{/user}","branches_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/branches{/branch}","tags_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/tags","blobs_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/git/refs{/sha}","trees_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/statuses/{sha}","languages_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/languages","stargazers_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/stargazers","contributors_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/contributors","subscribers_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/subscribers","subscription_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/subscription","commits_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/commits{/sha}","git_commits_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/git/commits{/sha}","comments_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/comments{/number}","issue_comment_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/issues/comments{/number}","contents_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/contents/{+path}","compare_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/merges","archive_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/downloads","issues_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/issues{/number}","pulls_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/pulls{/number}","milestones_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/milestones{/number}","notifications_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/labels{/name}","releases_url":"https://api.github.com/repos/amuniz/acceptance-test-harness/releases{/id}","created_at":"2015-08-14T15:42:46Z","updated_at":"2015-08-14T15:42:48Z","pushed_at":"2015-09-28T06:47:26Z","git_url":"git://github.com/amuniz/acceptance-test-harness.git","ssh_url":"git@github.com:amuniz/acceptance-test-harness.git","clone_url":"https://github.com/amuniz/acceptance-test-harness.git","svn_url":"https://github.com/amuniz/acceptance-test-harness","homepage":null,"size":7754,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"jenkinsci:master","ref":"master","sha":"ba5885b7bcc734a83ffeae3984b3732439de2907","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":17294237,"name":"acceptance-test-harness","full_name":"jenkinsci/acceptance-test-harness","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/acceptance-test-harness","description":"Attempted port from selenium-tests to Java","fork":false,"url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness","forks_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/forks","keys_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/teams","hooks_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/events","assignees_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/tags","blobs_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/subscription","commits_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/merges","archive_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/downloads","issues_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/releases{/id}","created_at":"2014-02-28T17:39:55Z","updated_at":"2015-08-14T08:00:09Z","pushed_at":"2015-09-28T06:47:26Z","git_url":"git://github.com/jenkinsci/acceptance-test-harness.git","ssh_url":"git@github.com:jenkinsci/acceptance-test-harness.git","clone_url":"https://github.com/jenkinsci/acceptance-test-harness.git","svn_url":"https://github.com/jenkinsci/acceptance-test-harness","homepage":null,"size":10624,"stargazers_count":30,"watchers_count":30,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":3,"forks":49,"open_issues":3,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/40"},"html":{"href":"https://github.com/jenkinsci/acceptance-test-harness/pull/40"},"issue":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/40"},"comments":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/statuses/acfac5d57e85a773ca5a3dbc0712f91c961fb1d7"}}}}