How to define with credentials in groovy script in extended choice parameters

87 Views Asked by At

i need to withcredntails i am storing my AWS keys in Jenkins credentials

def command = 'aws acm list-certificates --query "CertificateSummaryList[?DomainName=='*.osdemo.cf'].CertificateArn" --output text'
def proc = command.execute()
proc.waitFor()              

def output = proc.in.text
def exitcode= proc.exitValue()
def error = proc.err.text

if (error) {
    println "Std Err: ${error}"
    println "Process exit code: ${exitcode}"
    return exitcode
}

//println output.split()
return output.tokenize()
0

There are 0 best solutions below