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

generated tag incorrect when docker registry URL is a short name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
    • Environment:
      Ubuntu 14.04
      Jenkins ver. 1.609.1
      docker-build-publish plugin ver. 1.0
      no reverse proxy
    • Similar Issues:

      Description

      Steps to reproduce:

      1. create a freestyle job that will be building a docker image
      2. fill in source details (any repo with a Dockerfile)
      3. add a Docker Builld and Publish step
      4. fill in a repository name (e.g. myimg)
      5. use a shortname of a custom registry in Docker registry URL field (e.g. https://myregistry:443/v1/
      6. save and run the job

      Expected outcome:
      Job succeeds, the image is tagged as myregistry:443/myimg and pushed OK.

      Actual outcome:
      Job fails, the image is tagged as myregistry/myimg which means docker push tries to push it to the public DockerHub registry (and fails as there are no credentials).

      Notes:
      I suspect this is in DockerBuilder.Perform.getNameAndTag defined in https://github.com/jenkinsci/docker-build-publish-plugin/blob/master/src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java#L272 or possibly even in DockerBuilder.getRepo. I'm not familiar with the code so wasn't sure what will be affected if that is changed.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            csanchez Carlos Sanchez
            Reporter:
            jitakirin m jitakirin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: