{"action":"created","comment":{"url":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/comments/186477928","pull_request_review_id":118063010,"id":186477928,"diff_hunk":"@@ -0,0 +1,117 @@\n+/**\n+ * Builds a custom Jenkins WAR using <a href=\"https://github.com/jenkinsci/custom-war-packager\">Custom WAR Packager</a>.\n+ * The method supports both YAML BOM and Custom WAR Packager YAM as an input.\n+ *\n+ * @param metadataFile Path to the metadata file.\n+ * @param outputWAR Path, to which the output WAR file should be written\n+ * @param outputBOM Path, to which the output BOM file should be written.\n+ *                  More info about BOMs: https://github.com/jenkinsci/jep/pull/92\n+ * @param mvnSettingsFile\n+ *                  Maven Settings file to be used during the build.\n+ *                  If {@code null}, it will be determined automatically.\n+ * @return nothing\n+ */\n+def build(String metadataFile, String outputWAR, String outputBOM, String mvnSettingsFile) {\n+    def metadata = readYaml(file: metadataFile)\n+    def bomFilePath = metadata.packaging.bom ?: null\n+    def environment = metadata.packaging.environment","path":"vars/customWARPackager.groovy","position":17,"original_position":17,"commit_id":"3c52630661ec404f08747b66ec2cff03c527bfca","original_commit_id":"3c52630661ec404f08747b66ec2cff03c527bfca","user":{"login":"raul-arabaolaza","id":642531,"avatar_url":"https://avatars0.githubusercontent.com/u/642531?v=4","gravatar_id":"","url":"https://api.github.com/users/raul-arabaolaza","html_url":"https://github.com/raul-arabaolaza","followers_url":"https://api.github.com/users/raul-arabaolaza/followers","following_url":"https://api.github.com/users/raul-arabaolaza/following{/other_user}","gists_url":"https://api.github.com/users/raul-arabaolaza/gists{/gist_id}","starred_url":"https://api.github.com/users/raul-arabaolaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raul-arabaolaza/subscriptions","organizations_url":"https://api.github.com/users/raul-arabaolaza/orgs","repos_url":"https://api.github.com/users/raul-arabaolaza/repos","events_url":"https://api.github.com/users/raul-arabaolaza/events{/privacy}","received_events_url":"https://api.github.com/users/raul-arabaolaza/received_events","type":"User","site_admin":false},"body":"This is open to a NPE in case no `packaging` section is found, I would check for that section first and immediately return here if not found or use a NPE safe operator ","created_at":"2018-05-07T16:40:47Z","updated_at":"2018-05-07T16:46:35Z","html_url":"https://github.com/jenkins-infra/pipeline-library/pull/57#discussion_r186477928","pull_request_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/57","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/comments/186477928"},"html":{"href":"https://github.com/jenkins-infra/pipeline-library/pull/57#discussion_r186477928"},"pull_request":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/57","id":186399680,"html_url":"https://github.com/jenkins-infra/pipeline-library/pull/57","diff_url":"https://github.com/jenkins-infra/pipeline-library/pull/57.diff","patch_url":"https://github.com/jenkins-infra/pipeline-library/pull/57.patch","issue_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/issues/57","number":57,"state":"open","locked":false,"title":"[INFRA-1617] - Draft implementation of a library method for integration testing","user":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars0.githubusercontent.com/u/3000480?v=4","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"body":"https://issues.jenkins-ci.org/projects/INFRA/issues/INFRA-1617\r\n\r\nThis change offers a single-method runner for Essentials-alike flow with PCT and ATH. This flow may be used for testing both plugins, Jenkins core and Core components. Hence it uses [Custom WAR Packager](https://github.com/jenkinsci/custom-war-packager) and offers a utility method for it.\r\n\r\nDemo for Remoting: https://github.com/oleg-nenashev/remoting/pull/2\r\n\r\nSample configuration (for Remoting):\r\n\r\n```yml\r\n---\r\npackaging:\r\n  config:\r\n    bundle:\r\n      groupId: \"io.jenkins.tools.war-packager.demo\"\r\n      artifactId: \"jenkins-remoting-it\"\r\n      vendor: \"Jenkins project\"\r\n      title: \"Remoting Integration Tests WAR\"\r\n      description: \"Jenkins WAR, which bundles local Remoting build and plugin for PCT\"\r\n    war:\r\n      groupId: \"org.jenkins-ci.main\"\r\n      artifactId: \"jenkins-war\"\r\n      source:\r\n        version: \"2.107.2\"\r\n    plugins:\r\n      - groupId: \"org.jenkins-ci.plugins\"\r\n        artifactId: \"ssh-slaves\"\r\n        source:\r\n          version: \"1.25\"\r\n      - groupId: \"org.jenkins-ci.plugins\"\r\n        artifactId: \"command-launcher\"\r\n        source:\r\n          version: \"1.2\"\r\n      - groupId: \"org.jenkins-ci.plugins\"\r\n        artifactId: \"windows-slaves\"\r\n        source:\r\n          version: \"1.3.1\"\r\n      - groupId: \"org.jenkins-ci.plugins\"\r\n        artifactId: \"credentials\"\r\n        source:\r\n          version: \"2.1.10\"\r\n      - groupId: \"org.jenkins-ci.plugins\"\r\n        artifactId: \"ssh-credentials\"\r\n        source:\r\n          version: \"1.12\"\r\n    libPatches:\r\n      # Override Remoting by a locally built version\r\n      - groupId: \"org.jenkins-ci.main\"\r\n        artifactId: \"remoting\"\r\n        source:\r\n          dir: ../../..\r\nath:\r\n  useLocalSnapshots: false\r\n  tests:\r\n    - \"plugins.SshSlavesPluginTest\"\r\n    - \"core.SlaveTest\"\r\n  categories:\r\n    - \"org.jenkinsci.test.acceptance.junit.SmokeTest\"\r\npct:\r\n  useLocalSnapshots: false\r\n  jth:\r\n    version: 2.38\r\n    passCustomJenkinsWAR: true\r\n  plugins:\r\n    - \"ssh-slaves\"\r\n    - \"command-launcher\"\r\n    - \"windows-slaves\"\r\n    # TODO: JTH/PCT does not work reliably against non-bundled plugins (if something else is bundled) - \"compress-artifacts\"\r\n```\r\n\r\n@reviewbybees @raul-arabaolaza \r\n","created_at":"2018-05-07T16:29:22Z","updated_at":"2018-05-07T16:46:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3b2cf967a236fa7e88600220fc10c242cef4e12","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/57/commits","review_comments_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/57/comments","review_comment_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/issues/57/comments","statuses_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/statuses/3c52630661ec404f08747b66ec2cff03c527bfca","head":{"label":"oleg-nenashev:INFRA-1617","ref":"INFRA-1617","sha":"3c52630661ec404f08747b66ec2cff03c527bfca","user":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars0.githubusercontent.com/u/3000480?v=4","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"repo":{"id":83421523,"name":"pipeline-library","full_name":"oleg-nenashev/pipeline-library","owner":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars0.githubusercontent.com/u/3000480?v=4","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oleg-nenashev/pipeline-library","description":"Collection of custom steps and variables for our Jenkins instance(s)","fork":true,"url":"https://api.github.com/repos/oleg-nenashev/pipeline-library","forks_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/forks","keys_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/teams","hooks_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/hooks","issue_events_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/issues/events{/number}","events_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/events","assignees_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/assignees{/user}","branches_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/branches{/branch}","tags_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/tags","blobs_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/statuses/{sha}","languages_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/languages","stargazers_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/stargazers","contributors_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/contributors","subscribers_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/subscribers","subscription_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/subscription","commits_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/contents/{+path}","compare_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/merges","archive_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/downloads","issues_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/issues{/number}","pulls_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/pulls{/number}","milestones_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/milestones{/number}","notifications_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/labels{/name}","releases_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/releases{/id}","deployments_url":"https://api.github.com/repos/oleg-nenashev/pipeline-library/deployments","created_at":"2017-02-28T10:50:14Z","updated_at":"2018-04-20T15:01:37Z","pushed_at":"2018-05-07T16:24:23Z","git_url":"git://github.com/oleg-nenashev/pipeline-library.git","ssh_url":"git@github.com:oleg-nenashev/pipeline-library.git","clone_url":"https://github.com/oleg-nenashev/pipeline-library.git","svn_url":"https://github.com/oleg-nenashev/pipeline-library","homepage":null,"size":166,"stargazers_count":2,"watchers_count":2,"language":"Groovy","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"jenkins-infra:master","ref":"master","sha":"405bd5688ded3857dc3eb78737761186daaf2e75","user":{"login":"jenkins-infra","id":7422698,"avatar_url":"https://avatars2.githubusercontent.com/u/7422698?v=4","gravatar_id":"","url":"https://api.github.com/users/jenkins-infra","html_url":"https://github.com/jenkins-infra","followers_url":"https://api.github.com/users/jenkins-infra/followers","following_url":"https://api.github.com/users/jenkins-infra/following{/other_user}","gists_url":"https://api.github.com/users/jenkins-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkins-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkins-infra/subscriptions","organizations_url":"https://api.github.com/users/jenkins-infra/orgs","repos_url":"https://api.github.com/users/jenkins-infra/repos","events_url":"https://api.github.com/users/jenkins-infra/events{/privacy}","received_events_url":"https://api.github.com/users/jenkins-infra/received_events","type":"Organization","site_admin":false},"repo":{"id":65505983,"name":"pipeline-library","full_name":"jenkins-infra/pipeline-library","owner":{"login":"jenkins-infra","id":7422698,"avatar_url":"https://avatars2.githubusercontent.com/u/7422698?v=4","gravatar_id":"","url":"https://api.github.com/users/jenkins-infra","html_url":"https://github.com/jenkins-infra","followers_url":"https://api.github.com/users/jenkins-infra/followers","following_url":"https://api.github.com/users/jenkins-infra/following{/other_user}","gists_url":"https://api.github.com/users/jenkins-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkins-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkins-infra/subscriptions","organizations_url":"https://api.github.com/users/jenkins-infra/orgs","repos_url":"https://api.github.com/users/jenkins-infra/repos","events_url":"https://api.github.com/users/jenkins-infra/events{/privacy}","received_events_url":"https://api.github.com/users/jenkins-infra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkins-infra/pipeline-library","description":"Collection of custom steps and variables for our Jenkins instance(s)","fork":false,"url":"https://api.github.com/repos/jenkins-infra/pipeline-library","forks_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/forks","keys_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/teams","hooks_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/hooks","issue_events_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/issues/events{/number}","events_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/events","assignees_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/assignees{/user}","branches_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/branches{/branch}","tags_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/tags","blobs_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/languages","stargazers_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/stargazers","contributors_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/contributors","subscribers_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/subscribers","subscription_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/subscription","commits_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/contents/{+path}","compare_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/merges","archive_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/downloads","issues_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/issues{/number}","pulls_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/labels{/name}","releases_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/releases{/id}","deployments_url":"https://api.github.com/repos/jenkins-infra/pipeline-library/deployments","created_at":"2016-08-11T22:35:59Z","updated_at":"2018-05-07T08:01:29Z","pushed_at":"2018-05-07T16:29:23Z","git_url":"git://github.com/jenkins-infra/pipeline-library.git","ssh_url":"git@github.com:jenkins-infra/pipeline-library.git","clone_url":"https://github.com/jenkins-infra/pipeline-library.git","svn_url":"https://github.com/jenkins-infra/pipeline-library","homepage":null,"size":135,"stargazers_count":36,"watchers_count":36,"language":"Groovy","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":32,"open_issues":7,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/57"},"html":{"href":"https://github.com/jenkins-infra/pipeline-library/pull/57"},"issue":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/issues/57"},"comments":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/jenkins-infra/pipeline-library/statuses/3c52630661ec404f08747b66ec2cff03c527bfca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"raul-arabaolaza"}}