{"action":"created","comment":{"url":"https://api.github.com/repos/SAP/jenkins-library/pulls/comments/210211225","pull_request_review_id":146376954,"id":210211225,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDIxMTIyNQ==","diff_hunk":"@@ -2,50 +2,58 @@ import com.sap.piper.ConfigurationLoader\n import com.sap.piper.ConfigurationMerger\n import com.sap.piper.JsonUtils\n \n-def call(Map parameters = [:]) {\n+import groovy.transform.Field\n \n-    def stepName = 'influxWriteData'\n+@Field def STEP_NAME = 'influxWriteData'\n \n-    handlePipelineStepErrors (stepName: stepName, stepParameters: parameters, allowBuildFailure: true) {\n+@Field Set GENERAL_CONFIG_KEYS = []\n+@Field Set STEP_CONFIG_KEYS = [\n+    'influxServer',\n+    'influxPrefix'\n+]\n+@Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS.plus([\n+    'artifactVersion'\n+])\n \n-        def script = parameters.script\n-        if (script == null)\n-            script = [commonPipelineEnvironment: commonPipelineEnvironment]\n+def call(Map parameters = [:]) {\n+    handlePipelineStepErrors (stepName: STEP_NAME, stepParameters: parameters, allowBuildFailure: true) {\n+        def script = parameters.script ?: [commonPipelineEnvironment: commonPipelineEnvironment]\n \n-        prepareDefaultValues script: script\n+        // load default & individual configuration\n+        Map configuration = ConfigurationHelper\n+            .loadStepDefaults(this)\n+            .mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)\n+            .mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)\n+            .mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName?:env.STAGE_NAME, STEP_CONFIG_KEYS)\n+            .mixin([\n+                artifactVersion: commonPipelineEnvironment.getArtifactVersion()\n+            ])\n+            .mixin(parameters, PARAMETER_KEYS)\n+            .use()\n \n-        Set parameterKeys = [\n-            'artifactVersion',\n-            'influxServer',\n-            'influxPrefix'\n-        ]\n         Map pipelineDataMap = [\n             artifactVersion: commonPipelineEnvironment.getArtifactVersion()\n         ]\n-        Set stepConfigurationKeys = [\n-            'influxServer',\n-            'influxPrefix'\n-        ]\n \n-        Map configuration = ConfigurationMerger.merge(script, stepName, parameters, parameterKeys, pipelineDataMap, stepConfigurationKeys)\n+        Map configuration = ConfigurationMerger.merge(script, STEP_NAME, parameters, parameterKeys, pipelineDataMap, stepConfigurationKeys)\n \n         def artifactVersion = configuration.artifactVersion\n         if (!artifactVersion)  {\n             //this takes care that terminated builds due to milestone-locking do not cause an error\n-            echo \"[${stepName}] no artifact version available -> exiting writeInflux without writing data\"\n+            echo \"[${STEP_NAME}] no artifact version available -> exiting writeInflux without writing data\"\n             return\n         }\n \n         def influxServer = configuration.influxServer\n         def influxPrefix = configuration.influxPrefix\n \n-        echo \"\"\"[${stepName}]----------------------------------------------------------\n+        echo \"\"\"[${STEP_NAME}]----------------------------------------------------------","path":"vars/influxWriteData.groovy","position":68,"original_position":68,"commit_id":"71857038c4a14afe6cbc74c1230608f8438d1519","original_commit_id":"71857038c4a14afe6cbc74c1230608f8438d1519","user":{"login":"marcusholl","id":1853183,"node_id":"MDQ6VXNlcjE4NTMxODM=","avatar_url":"https://avatars2.githubusercontent.com/u/1853183?v=4","gravatar_id":"","url":"https://api.github.com/users/marcusholl","html_url":"https://github.com/marcusholl","followers_url":"https://api.github.com/users/marcusholl/followers","following_url":"https://api.github.com/users/marcusholl/following{/other_user}","gists_url":"https://api.github.com/users/marcusholl/gists{/gist_id}","starred_url":"https://api.github.com/users/marcusholl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcusholl/subscriptions","organizations_url":"https://api.github.com/users/marcusholl/orgs","repos_url":"https://api.github.com/users/marcusholl/repos","events_url":"https://api.github.com/users/marcusholl/events{/privacy}","received_events_url":"https://api.github.com/users/marcusholl/received_events","type":"User","site_admin":false},"body":"Be focused: PR is about adjusting the configuration, it is not about STEP_NAME, it is not above providing the script in a more groovy like way. Both is fine, but would be worth a dedicated pull request. This simplifies and speeds up reviews.","created_at":"2018-08-15T09:07:35Z","updated_at":"2018-08-15T09:07:35Z","html_url":"https://github.com/SAP/jenkins-library/pull/253#discussion_r210211225","pull_request_url":"https://api.github.com/repos/SAP/jenkins-library/pulls/253","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SAP/jenkins-library/pulls/comments/210211225"},"html":{"href":"https://github.com/SAP/jenkins-library/pull/253#discussion_r210211225"},"pull_request":{"href":"https://api.github.com/repos/SAP/jenkins-library/pulls/253"}}},"pull_request":{"url":"https://api.github.com/repos/SAP/jenkins-library/pulls/253","id":208508429,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NTA4NDI5","html_url":"https://github.com/SAP/jenkins-library/pull/253","diff_url":"https://github.com/SAP/jenkins-library/pull/253.diff","patch_url":"https://github.com/SAP/jenkins-library/pull/253.patch","issue_url":"https://api.github.com/repos/SAP/jenkins-library/issues/253","number":253,"state":"open","locked":false,"title":"use new config handler in steps","user":{"login":"CCFenner","id":26137398,"node_id":"MDQ6VXNlcjI2MTM3Mzk4","avatar_url":"https://avatars2.githubusercontent.com/u/26137398?v=4","gravatar_id":"","url":"https://api.github.com/users/CCFenner","html_url":"https://github.com/CCFenner","followers_url":"https://api.github.com/users/CCFenner/followers","following_url":"https://api.github.com/users/CCFenner/following{/other_user}","gists_url":"https://api.github.com/users/CCFenner/gists{/gist_id}","starred_url":"https://api.github.com/users/CCFenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCFenner/subscriptions","organizations_url":"https://api.github.com/users/CCFenner/orgs","repos_url":"https://api.github.com/users/CCFenner/repos","events_url":"https://api.github.com/users/CCFenner/events{/privacy}","received_events_url":"https://api.github.com/users/CCFenner/received_events","type":"User","site_admin":false},"body":"**changes:**\r\n- use new config handler in:\r\n  - `checksPublishResults`\r\n  - `influxWriteData`\r\n  - `mavenExecute`\r\n  - `mtaBuild`","created_at":"2018-08-15T09:00:07Z","updated_at":"2018-08-15T09:07:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f41db9762bb7c5300d2fbf2d0bbac8b399c9982e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"OliverNocon","id":33484802,"node_id":"MDQ6VXNlcjMzNDg0ODAy","avatar_url":"https://avatars2.githubusercontent.com/u/33484802?v=4","gravatar_id":"","url":"https://api.github.com/users/OliverNocon","html_url":"https://github.com/OliverNocon","followers_url":"https://api.github.com/users/OliverNocon/followers","following_url":"https://api.github.com/users/OliverNocon/following{/other_user}","gists_url":"https://api.github.com/users/OliverNocon/gists{/gist_id}","starred_url":"https://api.github.com/users/OliverNocon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OliverNocon/subscriptions","organizations_url":"https://api.github.com/users/OliverNocon/orgs","repos_url":"https://api.github.com/users/OliverNocon/repos","events_url":"https://api.github.com/users/OliverNocon/events{/privacy}","received_events_url":"https://api.github.com/users/OliverNocon/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SAP/jenkins-library/pulls/253/commits","review_comments_url":"https://api.github.com/repos/SAP/jenkins-library/pulls/253/comments","review_comment_url":"https://api.github.com/repos/SAP/jenkins-library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SAP/jenkins-library/issues/253/comments","statuses_url":"https://api.github.com/repos/SAP/jenkins-library/statuses/71857038c4a14afe6cbc74c1230608f8438d1519","head":{"label":"SAP:CCFenner/newConfig","ref":"CCFenner/newConfig","sha":"71857038c4a14afe6cbc74c1230608f8438d1519","user":{"login":"SAP","id":2531208,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzEyMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2531208?v=4","gravatar_id":"","url":"https://api.github.com/users/SAP","html_url":"https://github.com/SAP","followers_url":"https://api.github.com/users/SAP/followers","following_url":"https://api.github.com/users/SAP/following{/other_user}","gists_url":"https://api.github.com/users/SAP/gists{/gist_id}","starred_url":"https://api.github.com/users/SAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAP/subscriptions","organizations_url":"https://api.github.com/users/SAP/orgs","repos_url":"https://api.github.com/users/SAP/repos","events_url":"https://api.github.com/users/SAP/events{/privacy}","received_events_url":"https://api.github.com/users/SAP/received_events","type":"Organization","site_admin":false},"repo":{"id":107318996,"node_id":"MDEwOlJlcG9zaXRvcnkxMDczMTg5OTY=","name":"jenkins-library","full_name":"SAP/jenkins-library","owner":{"login":"SAP","id":2531208,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzEyMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2531208?v=4","gravatar_id":"","url":"https://api.github.com/users/SAP","html_url":"https://github.com/SAP","followers_url":"https://api.github.com/users/SAP/followers","following_url":"https://api.github.com/users/SAP/following{/other_user}","gists_url":"https://api.github.com/users/SAP/gists{/gist_id}","starred_url":"https://api.github.com/users/SAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAP/subscriptions","organizations_url":"https://api.github.com/users/SAP/orgs","repos_url":"https://api.github.com/users/SAP/repos","events_url":"https://api.github.com/users/SAP/events{/privacy}","received_events_url":"https://api.github.com/users/SAP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SAP/jenkins-library","description":"Jenkins shared library for Continuous Delivery pipelines.","fork":false,"url":"https://api.github.com/repos/SAP/jenkins-library","forks_url":"https://api.github.com/repos/SAP/jenkins-library/forks","keys_url":"https://api.github.com/repos/SAP/jenkins-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SAP/jenkins-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SAP/jenkins-library/teams","hooks_url":"https://api.github.com/repos/SAP/jenkins-library/hooks","issue_events_url":"https://api.github.com/repos/SAP/jenkins-library/issues/events{/number}","events_url":"https://api.github.com/repos/SAP/jenkins-library/events","assignees_url":"https://api.github.com/repos/SAP/jenkins-library/assignees{/user}","branches_url":"https://api.github.com/repos/SAP/jenkins-library/branches{/branch}","tags_url":"https://api.github.com/repos/SAP/jenkins-library/tags","blobs_url":"https://api.github.com/repos/SAP/jenkins-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SAP/jenkins-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SAP/jenkins-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/SAP/jenkins-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SAP/jenkins-library/statuses/{sha}","languages_url":"https://api.github.com/repos/SAP/jenkins-library/languages","stargazers_url":"https://api.github.com/repos/SAP/jenkins-library/stargazers","contributors_url":"https://api.github.com/repos/SAP/jenkins-library/contributors","subscribers_url":"https://api.github.com/repos/SAP/jenkins-library/subscribers","subscription_url":"https://api.github.com/repos/SAP/jenkins-library/subscription","commits_url":"https://api.github.com/repos/SAP/jenkins-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/SAP/jenkins-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/SAP/jenkins-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/SAP/jenkins-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/SAP/jenkins-library/contents/{+path}","compare_url":"https://api.github.com/repos/SAP/jenkins-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SAP/jenkins-library/merges","archive_url":"https://api.github.com/repos/SAP/jenkins-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SAP/jenkins-library/downloads","issues_url":"https://api.github.com/repos/SAP/jenkins-library/issues{/number}","pulls_url":"https://api.github.com/repos/SAP/jenkins-library/pulls{/number}","milestones_url":"https://api.github.com/repos/SAP/jenkins-library/milestones{/number}","notifications_url":"https://api.github.com/repos/SAP/jenkins-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SAP/jenkins-library/labels{/name}","releases_url":"https://api.github.com/repos/SAP/jenkins-library/releases{/id}","deployments_url":"https://api.github.com/repos/SAP/jenkins-library/deployments","created_at":"2017-10-17T20:14:48Z","updated_at":"2018-08-15T08:56:34Z","pushed_at":"2018-08-15T09:00:27Z","git_url":"git://github.com/SAP/jenkins-library.git","ssh_url":"git@github.com:SAP/jenkins-library.git","clone_url":"https://github.com/SAP/jenkins-library.git","svn_url":"https://github.com/SAP/jenkins-library","homepage":null,"size":2591,"stargazers_count":84,"watchers_count":84,"language":"Groovy","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":53,"open_issues":28,"watchers":84,"default_branch":"master"}},"base":{"label":"SAP:master","ref":"master","sha":"e49633a7d273eaadf318cff25cdc4d31fc48829d","user":{"login":"SAP","id":2531208,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzEyMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2531208?v=4","gravatar_id":"","url":"https://api.github.com/users/SAP","html_url":"https://github.com/SAP","followers_url":"https://api.github.com/users/SAP/followers","following_url":"https://api.github.com/users/SAP/following{/other_user}","gists_url":"https://api.github.com/users/SAP/gists{/gist_id}","starred_url":"https://api.github.com/users/SAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAP/subscriptions","organizations_url":"https://api.github.com/users/SAP/orgs","repos_url":"https://api.github.com/users/SAP/repos","events_url":"https://api.github.com/users/SAP/events{/privacy}","received_events_url":"https://api.github.com/users/SAP/received_events","type":"Organization","site_admin":false},"repo":{"id":107318996,"node_id":"MDEwOlJlcG9zaXRvcnkxMDczMTg5OTY=","name":"jenkins-library","full_name":"SAP/jenkins-library","owner":{"login":"SAP","id":2531208,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzEyMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2531208?v=4","gravatar_id":"","url":"https://api.github.com/users/SAP","html_url":"https://github.com/SAP","followers_url":"https://api.github.com/users/SAP/followers","following_url":"https://api.github.com/users/SAP/following{/other_user}","gists_url":"https://api.github.com/users/SAP/gists{/gist_id}","starred_url":"https://api.github.com/users/SAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAP/subscriptions","organizations_url":"https://api.github.com/users/SAP/orgs","repos_url":"https://api.github.com/users/SAP/repos","events_url":"https://api.github.com/users/SAP/events{/privacy}","received_events_url":"https://api.github.com/users/SAP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SAP/jenkins-library","description":"Jenkins shared library for Continuous Delivery pipelines.","fork":false,"url":"https://api.github.com/repos/SAP/jenkins-library","forks_url":"https://api.github.com/repos/SAP/jenkins-library/forks","keys_url":"https://api.github.com/repos/SAP/jenkins-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SAP/jenkins-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SAP/jenkins-library/teams","hooks_url":"https://api.github.com/repos/SAP/jenkins-library/hooks","issue_events_url":"https://api.github.com/repos/SAP/jenkins-library/issues/events{/number}","events_url":"https://api.github.com/repos/SAP/jenkins-library/events","assignees_url":"https://api.github.com/repos/SAP/jenkins-library/assignees{/user}","branches_url":"https://api.github.com/repos/SAP/jenkins-library/branches{/branch}","tags_url":"https://api.github.com/repos/SAP/jenkins-library/tags","blobs_url":"https://api.github.com/repos/SAP/jenkins-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SAP/jenkins-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SAP/jenkins-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/SAP/jenkins-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SAP/jenkins-library/statuses/{sha}","languages_url":"https://api.github.com/repos/SAP/jenkins-library/languages","stargazers_url":"https://api.github.com/repos/SAP/jenkins-library/stargazers","contributors_url":"https://api.github.com/repos/SAP/jenkins-library/contributors","subscribers_url":"https://api.github.com/repos/SAP/jenkins-library/subscribers","subscription_url":"https://api.github.com/repos/SAP/jenkins-library/subscription","commits_url":"https://api.github.com/repos/SAP/jenkins-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/SAP/jenkins-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/SAP/jenkins-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/SAP/jenkins-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/SAP/jenkins-library/contents/{+path}","compare_url":"https://api.github.com/repos/SAP/jenkins-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SAP/jenkins-library/merges","archive_url":"https://api.github.com/repos/SAP/jenkins-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SAP/jenkins-library/downloads","issues_url":"https://api.github.com/repos/SAP/jenkins-library/issues{/number}","pulls_url":"https://api.github.com/repos/SAP/jenkins-library/pulls{/number}","milestones_url":"https://api.github.com/repos/SAP/jenkins-library/milestones{/number}","notifications_url":"https://api.github.com/repos/SAP/jenkins-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SAP/jenkins-library/labels{/name}","releases_url":"https://api.github.com/repos/SAP/jenkins-library/releases{/id}","deployments_url":"https://api.github.com/repos/SAP/jenkins-library/deployments","created_at":"2017-10-17T20:14:48Z","updated_at":"2018-08-15T08:56:34Z","pushed_at":"2018-08-15T09:00:27Z","git_url":"git://github.com/SAP/jenkins-library.git","ssh_url":"git@github.com:SAP/jenkins-library.git","clone_url":"https://github.com/SAP/jenkins-library.git","svn_url":"https://github.com/SAP/jenkins-library","homepage":null,"size":2591,"stargazers_count":84,"watchers_count":84,"language":"Groovy","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":53,"open_issues":28,"watchers":84,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SAP/jenkins-library/pulls/253"},"html":{"href":"https://github.com/SAP/jenkins-library/pull/253"},"issue":{"href":"https://api.github.com/repos/SAP/jenkins-library/issues/253"},"comments":{"href":"https://api.github.com/repos/SAP/jenkins-library/issues/253/comments"},"review_comments":{"href":"https://api.github.com/repos/SAP/jenkins-library/pulls/253/comments"},"review_comment":{"href":"https://api.github.com/repos/SAP/jenkins-library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SAP/jenkins-library/pulls/253/commits"},"statuses":{"href":"https://api.github.com/repos/SAP/jenkins-library/statuses/71857038c4a14afe6cbc74c1230608f8438d1519"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"marcusholl"}}