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']]) {
    }
}
  • 1
    this is resolved, "credentialsId: creds" helped fix the issue. – Narasimha Nov 14 '18 at 6:48
  • Could you post an answer? – 030 Dec 24 '19 at 14:02