1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

[fix] Required parameter is not labeled as required in case there is a default

Otherwise the meaning of required is confusing.
This commit is contained in:
Marcus Holl 2018-12-17 12:11:15 +01:00
parent d140a20bb4
commit d9c536e25a

View File

@ -501,9 +501,11 @@ def handleStep(stepName, prepareDefaultValuesStep, gse) {
it ->
def defaultValue = Helper.getValue(defaultConfig, it.split('/'))
def parameterProperties = [
defaultValue: Helper.getValue(defaultConfig, it.split('/')),
required: requiredParameters.contains((it as String))
defaultValue: defaultValue,
required: requiredParameters.contains((it as String)) && defaultValue == null
]
step.parameters.put(it, parameterProperties)