From b7e19da7162ec88512251049845e28db50efbbef Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Wed, 29 Aug 2018 10:31:01 +0200 Subject: [PATCH 1/2] align step stage mixin order among pipeline steps --- vars/dockerExecute.groovy | 2 +- vars/dockerExecuteOnKubernetes.groovy | 2 +- vars/testsPublishResults.groovy | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vars/dockerExecute.groovy b/vars/dockerExecute.groovy index 02fae337c..df47c1acb 100644 --- a/vars/dockerExecute.groovy +++ b/vars/dockerExecute.groovy @@ -24,8 +24,8 @@ void call(Map parameters = [:], body) { Map config = ConfigurationHelper .loadStepDefaults(this) .mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS) - .mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName?:env.STAGE_NAME, STEP_CONFIG_KEYS) .mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS) + .mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName?:env.STAGE_NAME, STEP_CONFIG_KEYS) .mixin(parameters, PARAMETER_KEYS) .use() if (isKubernetes() && config.dockerImage) { diff --git a/vars/dockerExecuteOnKubernetes.groovy b/vars/dockerExecuteOnKubernetes.groovy index 60341c65e..132e51369 100644 --- a/vars/dockerExecuteOnKubernetes.groovy +++ b/vars/dockerExecuteOnKubernetes.groovy @@ -25,8 +25,8 @@ void call(Map parameters = [:], body) { ConfigurationHelper configHelper = ConfigurationHelper .loadStepDefaults(this) .mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS) - .mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName ?: env.STAGE_NAME, STEP_CONFIG_KEYS) .mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS) + .mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName ?: env.STAGE_NAME, STEP_CONFIG_KEYS) .mixin(parameters, PARAMETER_KEYS) .addIfEmpty('uniqueId', UUID.randomUUID().toString()) Map config = [:] diff --git a/vars/testsPublishResults.groovy b/vars/testsPublishResults.groovy index 92fbca72d..d168eaaca 100644 --- a/vars/testsPublishResults.groovy +++ b/vars/testsPublishResults.groovy @@ -32,6 +32,7 @@ def call(Map parameters = [:]) { .loadStepDefaults(this) .mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS) .mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS) + .mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName ?: env.STAGE_NAME, STEP_CONFIG_KEYS) .mixin(parameters, PARAMETER_KEYS) .use() From f2feb8f5ad99175224b244f0faab47b830e46d7e Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Fri, 31 Aug 2018 14:13:11 +0200 Subject: [PATCH 2/2] Ensure consistent location for files used by versioning tests (#278) --- test/groovy/ArtifactSetVersionTest.groovy | 2 +- .../sap/piper/versioning/DockerArtifactVersioningTest.groovy | 2 +- .../com/sap/piper/versioning/MavenArtifactVersioningTest.groovy | 2 +- .../{ => versioning}/DockerArtifactVersioning/Dockerfile | 0 test/resources/{ => versioning}/MavenArtifactVersioning/pom.xml | 0 .../{ => versioning}/MavenArtifactVersioning/snapshot/pom.xml | 0 6 files changed, 3 insertions(+), 3 deletions(-) rename test/resources/{ => versioning}/DockerArtifactVersioning/Dockerfile (100%) rename test/resources/{ => versioning}/MavenArtifactVersioning/pom.xml (100%) rename test/resources/{ => versioning}/MavenArtifactVersioning/snapshot/pom.xml (100%) diff --git a/test/groovy/ArtifactSetVersionTest.groovy b/test/groovy/ArtifactSetVersionTest.groovy index fd0faa716..c753aa0f5 100644 --- a/test/groovy/ArtifactSetVersionTest.groovy +++ b/test/groovy/ArtifactSetVersionTest.groovy @@ -41,7 +41,7 @@ class ArtifactSetVersionTest extends BasePiperTest { .around(thrown) .around(jlr) .around(jscr) - .around(new JenkinsReadMavenPomRule(this, 'test/resources/MavenArtifactVersioning')) + .around(new JenkinsReadMavenPomRule(this, 'test/resources/versioning/MavenArtifactVersioning')) .around(jwfr) .around(jder) .around(jsr) diff --git a/test/groovy/com/sap/piper/versioning/DockerArtifactVersioningTest.groovy b/test/groovy/com/sap/piper/versioning/DockerArtifactVersioningTest.groovy index 31ff8fc79..99a8c716b 100644 --- a/test/groovy/com/sap/piper/versioning/DockerArtifactVersioningTest.groovy +++ b/test/groovy/com/sap/piper/versioning/DockerArtifactVersioningTest.groovy @@ -20,7 +20,7 @@ class DockerArtifactVersioningTest extends BasePiperTest{ String passedDir - JenkinsReadFileRule jrfr = new JenkinsReadFileRule(this, 'test/resources/DockerArtifactVersioning') + JenkinsReadFileRule jrfr = new JenkinsReadFileRule(this, 'test/resources/versioning/DockerArtifactVersioning') JenkinsWriteFileRule jwfr = new JenkinsWriteFileRule(this) JenkinsLoggingRule jlr = new JenkinsLoggingRule(this) ExpectedException thrown = ExpectedException.none() diff --git a/test/groovy/com/sap/piper/versioning/MavenArtifactVersioningTest.groovy b/test/groovy/com/sap/piper/versioning/MavenArtifactVersioningTest.groovy index 3b96ea008..d3b0a6020 100644 --- a/test/groovy/com/sap/piper/versioning/MavenArtifactVersioningTest.groovy +++ b/test/groovy/com/sap/piper/versioning/MavenArtifactVersioningTest.groovy @@ -24,7 +24,7 @@ class MavenArtifactVersioningTest extends BasePiperTest{ public RuleChain ruleChain = Rules .getCommonRules(this) .around(jscr) - .around(new JenkinsReadMavenPomRule(this, 'test/resources/MavenArtifactVersioning')) + .around(new JenkinsReadMavenPomRule(this, 'test/resources/versioning/MavenArtifactVersioning')) @Before void init() { diff --git a/test/resources/DockerArtifactVersioning/Dockerfile b/test/resources/versioning/DockerArtifactVersioning/Dockerfile similarity index 100% rename from test/resources/DockerArtifactVersioning/Dockerfile rename to test/resources/versioning/DockerArtifactVersioning/Dockerfile diff --git a/test/resources/MavenArtifactVersioning/pom.xml b/test/resources/versioning/MavenArtifactVersioning/pom.xml similarity index 100% rename from test/resources/MavenArtifactVersioning/pom.xml rename to test/resources/versioning/MavenArtifactVersioning/pom.xml diff --git a/test/resources/MavenArtifactVersioning/snapshot/pom.xml b/test/resources/versioning/MavenArtifactVersioning/snapshot/pom.xml similarity index 100% rename from test/resources/MavenArtifactVersioning/snapshot/pom.xml rename to test/resources/versioning/MavenArtifactVersioning/snapshot/pom.xml