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 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.