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') {
SiteID = "bc1"
creds = "alip-$SiteID-user"
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.