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

[docker-build-publish-plugin] Skip Build and tag as latest not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
    • Environment:
    • Similar Issues:

      Description

      Using the docker-build-publish:1.0.1 does not force the tag latest as it should when Skip Build is checked.

      [listener] $ docker tag ***.net/***/listener ***.net/***/listener:1.0.3
      [listener] $ docker tag ***.net/***/listener ***.net/***/listener:latest
      Error response from daemon: Conflict: Tag latest is already set to image 3fc347(...), if you want to replace it, please use -f option
      Build step 'Docker Build and Publish' marked build as failure
      

      Other jobs, that indeed build the image, do not have this issue.

        Attachments

          Activity

          Hide
          rsilva4 Ruben Silva added a comment -

          As a workaround I used a Execute shell post-build step with the following:

          #!/bin/bash -x
          docker tag -f ***.net/***/listener ***.net/***/listener:latest
          docker push ***.net/***/listener:latest
          
          Show
          rsilva4 Ruben Silva added a comment - As a workaround I used a Execute shell post-build step with the following: #!/bin/bash -x docker tag -f ***.net/***/listener ***.net/***/listener:latest docker push ***.net/***/listener:latest
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Carlos Sanchez
          Path:
          src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java
          src/main/java/com/cloudbees/dockerpublish/ImageTag.java
          http://jenkins-ci.org/commit/docker-build-publish-plugin/151464385bf932061b585ce613a3c9d898399855
          Log:
          JENKINS-30770 Force latest tag when skip build is checked

          Compare: https://github.com/jenkinsci/docker-build-publish-plugin/compare/e715c82bebc1^...151464385bf9

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Carlos Sanchez Path: src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java src/main/java/com/cloudbees/dockerpublish/ImageTag.java http://jenkins-ci.org/commit/docker-build-publish-plugin/151464385bf932061b585ce613a3c9d898399855 Log: JENKINS-30770 Force latest tag when skip build is checked Compare: https://github.com/jenkinsci/docker-build-publish-plugin/compare/e715c82bebc1 ^...151464385bf9
          Show
          csanchez Carlos Sanchez added a comment - PR at https://github.com/jenkinsci/docker-build-publish-plugin/pull/29
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Carlos Sanchez
          Path:
          src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java
          src/main/java/com/cloudbees/dockerpublish/ImageTag.java
          http://jenkins-ci.org/commit/docker-build-publish-plugin/cd8596e06f121ba6302a8d522c248c6c8f17cdab
          Log:
          JENKINS-30770 Force latest tag when skip build is checked

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Carlos Sanchez Path: src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java src/main/java/com/cloudbees/dockerpublish/ImageTag.java http://jenkins-ci.org/commit/docker-build-publish-plugin/cd8596e06f121ba6302a8d522c248c6c8f17cdab Log: JENKINS-30770 Force latest tag when skip build is checked
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Carlos Sanchez
          Path:
          src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java
          src/main/java/com/cloudbees/dockerpublish/ImageTag.java
          http://jenkins-ci.org/commit/docker-build-publish-plugin/161ab1449cc0800dd903f62fc9014df5703b9539
          Log:
          JENKINS-30770 Force latest tag when skip build is checked

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Carlos Sanchez Path: src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java src/main/java/com/cloudbees/dockerpublish/ImageTag.java http://jenkins-ci.org/commit/docker-build-publish-plugin/161ab1449cc0800dd903f62fc9014df5703b9539 Log: JENKINS-30770 Force latest tag when skip build is checked
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Carlos Sanchez
          Path:
          src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java
          src/main/java/com/cloudbees/dockerpublish/ImageTag.java
          http://jenkins-ci.org/commit/docker-build-publish-plugin/c3d13c11b33ce6e053593e372734fa4454950ff7
          Log:
          Merge pull request #29 from jenkinsci/JENKINS-30770

          JENKINS-30770 Force latest tag when skip build is checked

          Compare: https://github.com/jenkinsci/docker-build-publish-plugin/compare/4b4b8eb7d20c...c3d13c11b33c

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Carlos Sanchez Path: src/main/java/com/cloudbees/dockerpublish/DockerBuilder.java src/main/java/com/cloudbees/dockerpublish/ImageTag.java http://jenkins-ci.org/commit/docker-build-publish-plugin/c3d13c11b33ce6e053593e372734fa4454950ff7 Log: Merge pull request #29 from jenkinsci/ JENKINS-30770 JENKINS-30770 Force latest tag when skip build is checked Compare: https://github.com/jenkinsci/docker-build-publish-plugin/compare/4b4b8eb7d20c...c3d13c11b33c

            People

            Assignee:
            csanchez Carlos Sanchez
            Reporter:
            rsilva4 Ruben Silva
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: