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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.