diff --git a/documentation/bin/createDocu.groovy b/documentation/bin/createDocu.groovy index d5e6c0961..a5fb01830 100644 --- a/documentation/bin/createDocu.groovy +++ b/documentation/bin/createDocu.groovy @@ -45,12 +45,12 @@ class TemplateHelper { | |In following sections of the config.yml the configuration is possible:\n\n'''.stripMargin() - t += '| parameter | general | step | stage |\n' - t += '|-----------|---------|------|-------|\n' + t += '| parameter | general | step/stage |\n' + t += '|-----------|---------|------------|\n' parameters.keySet().toSorted().each { def props = parameters.get(it) - t += "| `${it}` | ${props.GENERAL_CONFIG ? 'X' : ''} | ${props.STEP_CONFIG ? 'X' : ''} | ${props.STAGE_CONFIG ? 'X' : ''} |\n" + t += "| `${it}` | ${props.GENERAL_CONFIG ? 'X' : ''} | ${props.STEP_CONFIG ? 'X' : ''} |\n" } t.trim() @@ -517,8 +517,7 @@ def handleStep(stepName, prepareDefaultValuesStep, gse) { required: true, GENERAL_CONFIG: false, - STEP_CONFIG: false, - STAGE_CONFIG: false + STEP_CONFIG: false ] // END special handling for 'script' parameter diff --git a/test/groovy/CheckChangeInDevelopmentTest.groovy b/test/groovy/CheckChangeInDevelopmentTest.groovy index 424e47e5b..f7230fee1 100644 --- a/test/groovy/CheckChangeInDevelopmentTest.groovy +++ b/test/groovy/CheckChangeInDevelopmentTest.groovy @@ -4,7 +4,7 @@ import org.junit.Test import org.junit.rules.ExpectedException import org.junit.rules.RuleChain -import com.sap.piper.GitUtils +import com.sap.piper.cm.BackendType import com.sap.piper.cm.ChangeManagement import com.sap.piper.cm.ChangeManagementException @@ -155,6 +155,23 @@ class CheckChangeInDevelopmentTest extends BasePiperTest { } + @Test + public void stageConfigIsNotConsideredWithParamKeysTest() { + + nullScript.commonPipelineEnvironment.configuration = [stages:[foo:[changeDocumentId:'12345']]] + ChangeManagement cm = getChangeManagementUtils(true, '') + + thrown.expect(IllegalArgumentException) + thrown.expectMessage('No changeDocumentId provided.') + + stepRule.step.checkChangeInDevelopment( + script: nullScript, + cmUtils: cm, + changeManagement: [type: BackendType.SOLMAN, + endpoint: 'https://example.org/cm'], + stageName: 'foo') + } + private ChangeManagement getChangeManagementUtils(boolean inDevelopment, String changeDocumentId = '001') { return new ChangeManagement(nullScript, null) {