Docker Pipeline Plugin withRegistry and Authorize Plugin fails to get credentialsId

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • docker-workflow 1.18

      When using the Authorization Project plugin and using "Run as Specific User" or "Run as User Who Triggered Build" authorize strategy and the following pipeline code:

      node {
        // success
        withCredentials([usernameColonPassword(credentialsId: '$CredentialsID', variable: 'USERPASS')]) {
          println "${USERPASS}"
        }
      
        //failure
        docker.withRegistry('$Url:$Port', '$CredentialsID') {
          def dockerImage = docker.image('$dockerImageID)
          dockerImage.push('test')
        }
      }
      

      We get an error at the docker.withRegistry step:

      ERROR: Could not find credentials matching bonjwa-docker-artl
      

      Note that the previous step withCredentials is successful.

            Assignee:
            Allan BURDAJEWICZ
            Reporter:
            James Sweet
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: