@NonCPS |
def createBooleanParameter(String desc, String value){
|
return [$class: 'BooleanParameterDefinition', defaultValue: true, description: desc, name: value] |
} |
|
node { |
def userInput = input( |
id: 'userInput', message: 'The below Scenarios failed, let\'s rerun them?', parameters: [ |
createBooleanParameter('ScenarioA','Platform1-VariantA'),
|
createBooleanParameter('ScenarioB','Platform1-VariantB'),
|
createBooleanParameter('ScenarioC','Platform3-VariantA')
|
]) |
// BooleanParameters are based on Key=> String based and Value=> Boolean based // then iterate through the list of parameters which are enable
|
|
userInput?.findAll{ it.value }?.each { |
println it.key.toString() |
} |