Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60700

Credentials Binding Plugin binds to partial string matches

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • credentials-binding-plugin 1.20
      Jenkins 2.190.1

      Same as JENKINS-43032, except the value I bound to a username in withCredentials is being bound to a string not related to the binding.  

      ex.

      CHART_NAME=ingestion-tracking

      value of DATASOURCE_USERNAME = ingestion

      withCredentials([usernamePassword(credentialsId: "${DATASOURCE_CREDS}", passwordVariable: 'DATASOURCE_PASSWORD', usernameVariable: 'DATASOURCE_USERNAME')
      ]) {
        sh "echo ${DATASOURCE_USERNAME}"

        sh "echo ${CHART_NAME}"
      }

      will yield:
      ****
      ****-tracking

       

      I expect:
      ****

      ingestion-tracking

       

            Unassigned Unassigned
            timmerkt_perspecta Tim Merkt
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: