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

Attempts to tag with "c" cause "Multiple IDs found with provided prefix"

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This is a funny one. One of our jenkins jobs is hitting this intermittently, I can't see an obvious cause.

      It appears that the build and publish plugin is trying to tag the docker image id "c" with our image tag. Docker doesn't like this (because there is more than one image matching c*) and complains:

      Successfully built 9ed7fb84ebda
      [mydockerimage] $ docker tag --force=true c myregistry/mydockerimage:latest
      time="2015-06-09T10:50:50+01:00" level=fatal msg="Error response from daemon: could not find image: Multiple IDs found with provided prefix" 
      

      I did originally have the plugin set up to tag as "latest" (explicitly set) with the latest tag option disabled. Switching this round (setting this to null and enabling tag as latest) appears to have fixed the issue. However, given the fact that this exact config succeeded on multiple occasions, I'm not convinced that this is actually a fix.

        Attachments

          Activity

          Hide
          csanchez Carlos Sanchez added a comment -

          I think getImageBuiltFromStdout is not parsing correctly the build output, can you post the full output?

          Show
          csanchez Carlos Sanchez added a comment - I think getImageBuiltFromStdout is not parsing correctly the build output, can you post the full output?
          Hide
          odoublewen Owen Solberg added a comment - - edited

          I am also seeing this issue and I believe I understand why.

          The getImageBuiltFromStdout assumes that the string "Successfully built abcdef0123456" refers to the docker image built. But other tools use this phrase as well. In my case, conda is generating this, followed by the names of the packages.

          ...
          Successfully built bcbio-gff commonmark jsonmerge sphinx-argparse
          Installing collected packages: bcbio-gff, commonmark, jsonschema, jsonmerge, recommonmark, sphinx-argparse
          Successfully installed bcbio-gff-0.6.2 commonmark-0.5.4 jsonmerge-1.1.0 jsonschema-2.5.1 recommonmark-0.4.0 sphinx-argparse-0.1.15
          ...
          Successfully built 9113d8aacd07
          [hxv_workflow] $ docker tag --force=true bcb hxv_workflow:latest
          Error response from daemon: could not find image: no such id: bcb
          Build step 'Docker Build and Publish' marked build as failure
          Finished: FAILURE}}

          Show
          odoublewen Owen Solberg added a comment - - edited I am also seeing this issue and I believe I understand why. The getImageBuiltFromStdout assumes that the string "Successfully built abcdef0123456" refers to the docker image built. But other tools use this phrase as well. In my case, conda is generating this, followed by the names of the packages. ... Successfully built bcbio-gff commonmark jsonmerge sphinx-argparse Installing collected packages: bcbio-gff, commonmark, jsonschema, jsonmerge, recommonmark, sphinx-argparse Successfully installed bcbio-gff-0.6.2 commonmark-0.5.4 jsonmerge-1.1.0 jsonschema-2.5.1 recommonmark-0.4.0 sphinx-argparse-0.1.15 ... Successfully built 9113d8aacd07 [hxv_workflow] $ docker tag --force=true bcb hxv_workflow:latest Error response from daemon: could not find image: no such id: bcb Build step 'Docker Build and Publish' marked build as failure Finished: FAILURE}}
          Show
          csanchez Carlos Sanchez added a comment - Fixed in https://github.com/jenkinsci/docker-build-publish-plugin/pull/27

            People

            Assignee:
            csanchez Carlos Sanchez
            Reporter:
            andy Andy Smith
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: