1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

Merge pull request #658 from marcusholl/pr/fetchPossibleValues

fetch possible values from @see
This commit is contained in:
Alejandra Ferreiro Vidal 2019-04-13 16:34:59 +02:00 committed by GitHub
commit e2544be073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -448,6 +448,8 @@ for(step in stepDescriptors) {
def otherStep = param.value.docu.replaceAll('@see', '').trim()
param.value.docu = fetchTextFrom(otherStep, param.key, stepDescriptors)
param.value.mandatory = fetchMandatoryFrom(otherStep, param.key, stepDescriptors)
if(! param.value.value)
param.value.value = fetchPossibleValuesFrom(otherStep, param.key, stepDescriptors)
}
}
}
@ -511,6 +513,10 @@ def fetchMandatoryFrom(def step, def parameterName, def steps) {
}
}
def fetchPossibleValuesFrom(def step, def parameterName, def steps) {
return steps[step]?.parameters[parameterName]?.value ?: ''
}
def handleStep(stepName, prepareDefaultValuesStep, gse) {
File theStep = new File(stepsDir, "${stepName}.groovy")