imageName() drops registry prefix outside of withRegistry() block

XMLWordPrintable

    • Type: Bug
    • Resolution: Not A Defect
    • Priority: Minor
    • Component/s: docker-workflow-plugin
    • Environment:

      I have this pipeline:

      node {
           docker.withRegistry('https://my-private-repo') {
              sh 'echo "FROM ubuntu" > Dockerfile'
              img = docker.build('my-test-image:1.0.0')
              print img.imageName()
          }
          print img.imageName()
      }
      

      When the first print is done I get the expected full name with the registry prefix.
      The 2nd print however drops the registry prefix and I just get the id.

      Was not expecting that since the img object did not change.

            Assignee:
            Unassigned
            Reporter:
            Anthony Pioli
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: