我正在尝试访问凭据以部署到我的dsl服务器中。这是一项自由式的工作。如何从dsl访问凭据。
withCredentials([usernamePassword(credentialsId: 'cf-credential', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) {
sh "cf login -a http://url -u ${USERNAME} -p ${PASSWORD} -o ORG -s SPACE"
sh "cf push -f deploy/dev-manifest.yml"
}
但是我得到了错误:
No signature of method: javaposse.jobdsl.dsl.jobs.FreeStyleJob.usernamePassword() is applicable for argument types: (java.util.LinkedHashMap)