From b7468a7ae4d80ace230038a4ba9a0bc65f886c3f Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Thu, 29 Nov 2018 09:54:05 +0100 Subject: [PATCH] Step name is not a string literal anymore Having the step name always the same like the file name, which is in turn the class name is redundant. --- vars/artifactSetVersion.groovy | 2 +- vars/batsExecuteTests.groovy | 2 +- vars/checkChangeInDevelopment.groovy | 2 +- vars/checksPublishResults.groovy | 2 +- vars/cloudFoundryDeploy.groovy | 2 +- vars/dockerExecute.groovy | 2 +- vars/dockerExecuteOnKubernetes.groovy | 2 +- vars/durationMeasure.groovy | 2 +- vars/gaugeExecuteTests.groovy | 2 +- vars/githubPublishRelease.groovy | 2 +- vars/handlePipelineStepErrors.groovy | 2 +- vars/healthExecuteCheck.groovy | 2 +- vars/influxWriteData.groovy | 2 +- vars/karmaExecuteTests.groovy | 2 +- vars/mailSendNotification.groovy | 2 +- vars/mavenExecute.groovy | 2 +- vars/mtaBuild.groovy | 2 +- vars/neoDeploy.groovy | 2 +- vars/newmanExecute.groovy | 2 +- vars/pipelineExecute.groovy | 2 +- vars/pipelineRestartSteps.groovy | 2 +- vars/pipelineStashFiles.groovy | 2 +- vars/pipelineStashFilesAfterBuild.groovy | 2 +- vars/pipelineStashFilesBeforeBuild.groovy | 2 +- vars/prepareDefaultValues.groovy | 2 +- vars/seleniumExecuteTests.groovy | 2 +- vars/setupCommonPipelineEnvironment.groovy | 2 +- vars/snykExecute.groovy | 2 +- vars/testsPublishResults.groovy | 2 +- vars/toolValidate.groovy | 2 +- vars/transportRequestCreate.groovy | 2 +- vars/transportRequestRelease.groovy | 2 +- vars/transportRequestUploadFile.groovy | 2 +- 33 files changed, 33 insertions(+), 33 deletions(-) diff --git a/vars/artifactSetVersion.groovy b/vars/artifactSetVersion.groovy index 52a9337c5..0c66d816e 100644 --- a/vars/artifactSetVersion.groovy +++ b/vars/artifactSetVersion.groovy @@ -8,7 +8,7 @@ import com.sap.piper.versioning.ArtifactVersioning import groovy.transform.Field import groovy.text.SimpleTemplateEngine -@Field String STEP_NAME = 'artifactSetVersion' +@Field String STEP_NAME = getClass().getName() @Field Map CONFIG_KEY_COMPATIBILITY = [gitSshKeyCredentialsId: 'gitCredentialsId'] @Field Set GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/batsExecuteTests.groovy b/vars/batsExecuteTests.groovy index d5b81f5ad..16a39334d 100644 --- a/vars/batsExecuteTests.groovy +++ b/vars/batsExecuteTests.groovy @@ -6,7 +6,7 @@ import com.sap.piper.Utils import groovy.text.SimpleTemplateEngine import groovy.transform.Field -@Field String STEP_NAME = 'batsExecuteTests' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/checkChangeInDevelopment.groovy b/vars/checkChangeInDevelopment.groovy index 51413f232..f6521f015 100644 --- a/vars/checkChangeInDevelopment.groovy +++ b/vars/checkChangeInDevelopment.groovy @@ -14,7 +14,7 @@ import com.sap.piper.cm.ChangeManagementException import static com.sap.piper.cm.StepHelpers.getChangeDocumentId import static com.sap.piper.cm.StepHelpers.getBackendTypeAndLogInfoIfCMIntegrationDisabled -@Field def STEP_NAME = 'checkChangeInDevelopment' +@Field def STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/checksPublishResults.groovy b/vars/checksPublishResults.groovy index dc7b07c82..8ec884252 100644 --- a/vars/checksPublishResults.groovy +++ b/vars/checksPublishResults.groovy @@ -8,7 +8,7 @@ import com.sap.piper.Utils import groovy.transform.Field -@Field def STEP_NAME = 'checksPublishResults' +@Field def STEP_NAME = getClass().getName() @Field Set TOOLS = [ 'aggregation', 'tasks', 'pmd', 'cpd', 'findbugs', 'checkstyle', 'eslint', 'pylint' diff --git a/vars/cloudFoundryDeploy.groovy b/vars/cloudFoundryDeploy.groovy index b02735eac..b33d25ba8 100644 --- a/vars/cloudFoundryDeploy.groovy +++ b/vars/cloudFoundryDeploy.groovy @@ -6,7 +6,7 @@ import com.sap.piper.CfManifestUtils import groovy.transform.Field -@Field String STEP_NAME = 'cloudFoundryDeploy' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/dockerExecute.groovy b/vars/dockerExecute.groovy index 4e2c1a559..46e7401bc 100644 --- a/vars/dockerExecute.groovy +++ b/vars/dockerExecute.groovy @@ -9,7 +9,7 @@ import com.sap.piper.k8s.ContainerMap import groovy.transform.Field -@Field def STEP_NAME = 'dockerExecute' +@Field def STEP_NAME = getClass().getName() @Field def PLUGIN_ID_DOCKER_WORKFLOW = 'docker-workflow' @Field Set GENERAL_CONFIG_KEYS = ['jenkinsKubernetes'] diff --git a/vars/dockerExecuteOnKubernetes.groovy b/vars/dockerExecuteOnKubernetes.groovy index ccc1f98c8..e4eb2de89 100644 --- a/vars/dockerExecuteOnKubernetes.groovy +++ b/vars/dockerExecuteOnKubernetes.groovy @@ -7,7 +7,7 @@ import com.sap.piper.k8s.SystemEnv import groovy.transform.Field import hudson.AbortException -@Field def STEP_NAME = 'dockerExecuteOnKubernetes' +@Field def STEP_NAME = getClass().getName() @Field def PLUGIN_ID_KUBERNETES = 'kubernetes' @Field Set GENERAL_CONFIG_KEYS = ['jenkinsKubernetes'] @Field Set PARAMETER_KEYS = [ diff --git a/vars/durationMeasure.groovy b/vars/durationMeasure.groovy index e2bcdc787..2f254dd2c 100644 --- a/vars/durationMeasure.groovy +++ b/vars/durationMeasure.groovy @@ -1,7 +1,7 @@ import static com.sap.piper.Prerequisites.checkScript import groovy.transform.Field -@Field STEP_NAME = 'durationMeasure' +@Field STEP_NAME = getClass().getName() def call(Map parameters = [:], body) { diff --git a/vars/gaugeExecuteTests.groovy b/vars/gaugeExecuteTests.groovy index 2ac46bd4a..e2664ccd5 100644 --- a/vars/gaugeExecuteTests.groovy +++ b/vars/gaugeExecuteTests.groovy @@ -6,7 +6,7 @@ import com.sap.piper.GitUtils import groovy.text.SimpleTemplateEngine import groovy.transform.Field -@Field String STEP_NAME = 'gaugeExecuteTests' +@Field String STEP_NAME = getClass().getName() @Field Set STEP_CONFIG_KEYS = [ 'buildTool', 'dockerEnvVars', diff --git a/vars/githubPublishRelease.groovy b/vars/githubPublishRelease.groovy index d6bcc347b..2ec89bb3c 100644 --- a/vars/githubPublishRelease.groovy +++ b/vars/githubPublishRelease.groovy @@ -5,7 +5,7 @@ import com.sap.piper.ConfigurationHelper import groovy.transform.Field -@Field String STEP_NAME = 'githubPublishRelease' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = ['githubApiUrl', 'githubTokenCredentialsId', 'githubServerUrl'] @Field Set STEP_CONFIG_KEYS = [ 'addClosedIssues', diff --git a/vars/handlePipelineStepErrors.groovy b/vars/handlePipelineStepErrors.groovy index 00bb0ab5d..c304ac7f0 100644 --- a/vars/handlePipelineStepErrors.groovy +++ b/vars/handlePipelineStepErrors.groovy @@ -1,7 +1,7 @@ import groovy.text.SimpleTemplateEngine import groovy.transform.Field -@Field STEP_NAME = 'handlePipelineStepErrors' +@Field STEP_NAME = getClass().getName() void call(Map parameters = [:], body) { def stepParameters = parameters.stepParameters //mandatory diff --git a/vars/healthExecuteCheck.groovy b/vars/healthExecuteCheck.groovy index 723b83cc5..98472d2e2 100644 --- a/vars/healthExecuteCheck.groovy +++ b/vars/healthExecuteCheck.groovy @@ -4,7 +4,7 @@ import com.sap.piper.ConfigurationHelper import com.sap.piper.Utils import groovy.transform.Field -@Field String STEP_NAME = 'healthExecuteCheck' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/influxWriteData.groovy b/vars/influxWriteData.groovy index e1c323f69..e6ed78673 100644 --- a/vars/influxWriteData.groovy +++ b/vars/influxWriteData.groovy @@ -8,7 +8,7 @@ import com.sap.piper.Utils import groovy.transform.Field -@Field def STEP_NAME = 'influxWriteData' +@Field def STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = [] @Field Set STEP_CONFIG_KEYS = [ diff --git a/vars/karmaExecuteTests.groovy b/vars/karmaExecuteTests.groovy index 8dc16752b..e12b00f47 100644 --- a/vars/karmaExecuteTests.groovy +++ b/vars/karmaExecuteTests.groovy @@ -7,7 +7,7 @@ import com.sap.piper.Utils import groovy.text.SimpleTemplateEngine import groovy.transform.Field -@Field String STEP_NAME = 'karmaExecuteTests' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = [ /** port mappings required for containers. This will only take effect inside a Kubernetes pod, format [[containerPort: 1111, hostPort: 1111]] */ 'containerPortMappings', diff --git a/vars/mailSendNotification.groovy b/vars/mailSendNotification.groovy index 9f6edeaa7..14fc3333c 100644 --- a/vars/mailSendNotification.groovy +++ b/vars/mailSendNotification.groovy @@ -5,7 +5,7 @@ import com.sap.piper.Utils import groovy.text.SimpleTemplateEngine import groovy.transform.Field -@Field String STEP_NAME = 'mailSendNotification' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = ['gitSshKeyCredentialsId'] @Field Set STEP_CONFIG_KEYS = [ 'projectName', diff --git a/vars/mavenExecute.groovy b/vars/mavenExecute.groovy index 704bdbc8c..c91137cc4 100644 --- a/vars/mavenExecute.groovy +++ b/vars/mavenExecute.groovy @@ -5,7 +5,7 @@ import com.sap.piper.Utils import groovy.transform.Field -@Field def STEP_NAME = 'mavenExecute' +@Field def STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = [] @Field Set STEP_CONFIG_KEYS = [ diff --git a/vars/mtaBuild.groovy b/vars/mtaBuild.groovy index c0161b83b..bb76607fb 100644 --- a/vars/mtaBuild.groovy +++ b/vars/mtaBuild.groovy @@ -8,7 +8,7 @@ import com.sap.piper.tools.ToolDescriptor import groovy.transform.Field -@Field def STEP_NAME = 'mtaBuild' +@Field def STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = [] @Field Set STEP_CONFIG_KEYS = [ diff --git a/vars/neoDeploy.groovy b/vars/neoDeploy.groovy index 01c4128fb..66d4bf134 100644 --- a/vars/neoDeploy.groovy +++ b/vars/neoDeploy.groovy @@ -7,7 +7,7 @@ import com.sap.piper.tools.ToolDescriptor import groovy.transform.Field -@Field String STEP_NAME = 'neoDeploy' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = [] @Field Set STEP_CONFIG_KEYS = [ 'account', diff --git a/vars/newmanExecute.groovy b/vars/newmanExecute.groovy index 8ed3d5a57..cd2e2019b 100644 --- a/vars/newmanExecute.groovy +++ b/vars/newmanExecute.groovy @@ -6,7 +6,7 @@ import com.sap.piper.Utils import groovy.text.SimpleTemplateEngine import groovy.transform.Field -@Field String STEP_NAME = 'newmanExecute' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/pipelineExecute.groovy b/vars/pipelineExecute.groovy index 2607c5c8d..85f95aab8 100644 --- a/vars/pipelineExecute.groovy +++ b/vars/pipelineExecute.groovy @@ -3,7 +3,7 @@ import com.sap.piper.Utils import groovy.transform.Field -@Field STEP_NAME = 'pipelineExecute' +@Field STEP_NAME = getClass().getName() /** diff --git a/vars/pipelineRestartSteps.groovy b/vars/pipelineRestartSteps.groovy index b90d2c110..d94a34415 100644 --- a/vars/pipelineRestartSteps.groovy +++ b/vars/pipelineRestartSteps.groovy @@ -4,7 +4,7 @@ import com.sap.piper.JenkinsUtils import com.sap.piper.ConfigurationHelper import groovy.transform.Field -@Field String STEP_NAME = 'pipelineRestartSteps' +@Field String STEP_NAME = getClass().getName() @Field Set STEP_CONFIG_KEYS = [ 'sendMail', 'timeoutInSeconds' diff --git a/vars/pipelineStashFiles.groovy b/vars/pipelineStashFiles.groovy index cb58e7e91..286562293 100644 --- a/vars/pipelineStashFiles.groovy +++ b/vars/pipelineStashFiles.groovy @@ -1,6 +1,6 @@ import groovy.transform.Field -@Field STEP_NAME = 'pipelineStashFiles' +@Field STEP_NAME = getClass().getName() void call(Map parameters = [:], body) { handlePipelineStepErrors (stepName: 'pipelineStashFiles', stepParameters: parameters) { diff --git a/vars/pipelineStashFilesAfterBuild.groovy b/vars/pipelineStashFilesAfterBuild.groovy index edcd54d9d..7ca2a56ad 100644 --- a/vars/pipelineStashFilesAfterBuild.groovy +++ b/vars/pipelineStashFilesAfterBuild.groovy @@ -4,7 +4,7 @@ import com.sap.piper.Utils import com.sap.piper.ConfigurationHelper import groovy.transform.Field -@Field String STEP_NAME = 'pipelineStashFilesAfterBuild' +@Field String STEP_NAME = getClass().getName() @Field Set STEP_CONFIG_KEYS = ['runCheckmarx', 'stashIncludes', 'stashExcludes'] @Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS diff --git a/vars/pipelineStashFilesBeforeBuild.groovy b/vars/pipelineStashFilesBeforeBuild.groovy index dd90ba498..86657feaf 100644 --- a/vars/pipelineStashFilesBeforeBuild.groovy +++ b/vars/pipelineStashFilesBeforeBuild.groovy @@ -4,7 +4,7 @@ import com.sap.piper.Utils import com.sap.piper.ConfigurationHelper import groovy.transform.Field -@Field String STEP_NAME = 'pipelineStashFilesBeforeBuild' +@Field String STEP_NAME = getClass().getName() @Field Set STEP_CONFIG_KEYS = ['runOpaTests', 'stashIncludes', 'stashExcludes'] @Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS diff --git a/vars/prepareDefaultValues.groovy b/vars/prepareDefaultValues.groovy index 9c049065c..c1e80d323 100644 --- a/vars/prepareDefaultValues.groovy +++ b/vars/prepareDefaultValues.groovy @@ -3,7 +3,7 @@ import com.sap.piper.MapUtils import groovy.transform.Field -@Field STEP_NAME = 'prepareDefaultValues' +@Field STEP_NAME = getClass().getName() void call(Map parameters = [:]) { handlePipelineStepErrors (stepName: 'prepareDefaultValues', stepParameters: parameters) { diff --git a/vars/seleniumExecuteTests.groovy b/vars/seleniumExecuteTests.groovy index 62a637e71..93823db2d 100644 --- a/vars/seleniumExecuteTests.groovy +++ b/vars/seleniumExecuteTests.groovy @@ -7,7 +7,7 @@ import com.sap.piper.k8s.ContainerMap import groovy.transform.Field import groovy.text.SimpleTemplateEngine -@Field String STEP_NAME = 'seleniumExecuteTests' +@Field String STEP_NAME = getClass().getName() @Field GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/setupCommonPipelineEnvironment.groovy b/vars/setupCommonPipelineEnvironment.groovy index c9298e14c..ea6d1f704 100644 --- a/vars/setupCommonPipelineEnvironment.groovy +++ b/vars/setupCommonPipelineEnvironment.groovy @@ -4,7 +4,7 @@ import com.sap.piper.ConfigurationHelper import com.sap.piper.Utils import groovy.transform.Field -@Field String STEP_NAME = 'setupCommonPipelineEnvironment' +@Field String STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = ['collectTelemetryData'] void call(Map parameters = [:]) { diff --git a/vars/snykExecute.groovy b/vars/snykExecute.groovy index a4dd8834b..f555f04b2 100644 --- a/vars/snykExecute.groovy +++ b/vars/snykExecute.groovy @@ -6,7 +6,7 @@ import com.sap.piper.mta.MtaMultiplexer import groovy.transform.Field -@Field def STEP_NAME = 'snykExecute' +@Field def STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = ['snykCredentialsId'] @Field Set STEP_CONFIG_KEYS = GENERAL_CONFIG_KEYS.plus([ diff --git a/vars/testsPublishResults.groovy b/vars/testsPublishResults.groovy index 03875bb96..881aa9b05 100644 --- a/vars/testsPublishResults.groovy +++ b/vars/testsPublishResults.groovy @@ -11,7 +11,7 @@ import groovy.transform.Field 'junit','jacoco','cobertura','jmeter' ] -@Field def STEP_NAME = 'testsPublishResults' +@Field def STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = TOOLS @Field Set STEP_CONFIG_KEYS = TOOLS @Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS diff --git a/vars/toolValidate.groovy b/vars/toolValidate.groovy index 2813764d7..7168809d6 100644 --- a/vars/toolValidate.groovy +++ b/vars/toolValidate.groovy @@ -8,7 +8,7 @@ import groovy.transform.Field import hudson.AbortException -@Field STEP_NAME = 'toolValidate' +@Field STEP_NAME = getClass().getName() void call(Map parameters = [:]) { diff --git a/vars/transportRequestCreate.groovy b/vars/transportRequestCreate.groovy index cfa9ba023..91b27e5bb 100644 --- a/vars/transportRequestCreate.groovy +++ b/vars/transportRequestCreate.groovy @@ -13,7 +13,7 @@ import static com.sap.piper.cm.StepHelpers.getBackendTypeAndLogInfoIfCMIntegrati import static com.sap.piper.cm.StepHelpers.getChangeDocumentId import hudson.AbortException -@Field def STEP_NAME = 'transportRequestCreate' +@Field def STEP_NAME = getClass().getName() @Field GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/transportRequestRelease.groovy b/vars/transportRequestRelease.groovy index d11903f3e..938a3c6f0 100644 --- a/vars/transportRequestRelease.groovy +++ b/vars/transportRequestRelease.groovy @@ -14,7 +14,7 @@ import static com.sap.piper.cm.StepHelpers.getTransportRequestId import static com.sap.piper.cm.StepHelpers.getChangeDocumentId import static com.sap.piper.cm.StepHelpers.getBackendTypeAndLogInfoIfCMIntegrationDisabled -@Field def STEP_NAME = 'transportRequestRelease' +@Field def STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS diff --git a/vars/transportRequestUploadFile.groovy b/vars/transportRequestUploadFile.groovy index 34eef2ff7..10a6a7d71 100644 --- a/vars/transportRequestUploadFile.groovy +++ b/vars/transportRequestUploadFile.groovy @@ -14,7 +14,7 @@ import static com.sap.piper.cm.StepHelpers.getTransportRequestId import static com.sap.piper.cm.StepHelpers.getChangeDocumentId import static com.sap.piper.cm.StepHelpers.getBackendTypeAndLogInfoIfCMIntegrationDisabled -@Field def STEP_NAME = 'transportRequestUploadFile' +@Field def STEP_NAME = getClass().getName() @Field Set GENERAL_CONFIG_KEYS = [ 'changeManagement'