1

I am trying to pass a variable input to "credentialsId: $creds" from SiteID but unable to. I tried multiple expressions in pipeline script with quotes etc and none worked. I am learning and need suggestions. Below is code snippet.

node('master') {
stage('pass_the_salt'){
SiteID = "bc1"
creds = "alip-$SiteID-user"
try{
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: $creds,
    usernameVariable: 'DBUSER', passwordVariable: 'DBPASS']]) {
    }
}
  • this is resolved, "credentialsId: creds" helped fix the issue. – Narasimha Nov 14 '18 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.