Jenkins build with parameters option
Unable to find out why my groovy script is not running?
parameters {
extendedChoice(
bindings: 'image=image',
defaultValue: '',
description: 'Build',
groovyClasspath: '',
groovyScript: '''
import groovy.json.JsonSlurper
import java.util.logging.Logger
logger.info("****####")
def result =
"https://localhost:8080/$image/tag".toURL().text;
def jsonSlurper = new JsonSlurper();
def object = jsonSlurper.parseText(result);
value = object[0].Value
println value
def decoded = value.decodeBase64()
return String(decoded),
multiSelectDelimiter: ',',
name: 'BUILD',
quoteValue: false,
saveJSONParameterToFile: false,
type: 'PT_SINGLE_SELECT',
visibleItemCount: 5)
}