Code to match build ID to tag as latest does not work properly, causing redundant build

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Environment:
      CentOS 6.6 (chef/centos-6.6 vagrant vbox VM), jenkins from jenkins repo, docker from epel repo (also tested with latest 1.5.0 binary from docker site), docker-build-publish-plugin v0.15

      Having set up a build job with a Dockerfile from git that builds a docker image by installing an RPM that's copied in from another build job, for some reason although the tagged docker build run outputs 'Successfully built 8c27b2288fd7', the regex matching code in docker-build-publish-plugin/src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java line 189 does not seem to match it, and hence it does another docker build for tag 'latest' instead of just doing a docker tag. I can't from here see why it doesn't work, and I'm not sure how I can easily build my own environment in which to debug the code to fix it. Perhaps someone else can verify the issue and see what the cause is and get it fixed?

      Not a major issue in this case as both builds produce the same image ID and the 2nd build only takes a couple of seconds as every step is cached, but the code is clearly not doing what it is supposed to.

            Assignee:
            Carlos Sanchez
            Reporter:
            Edmund Craske
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: