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

Jenkins Pipeline still uses --force=yes for Docker Pipeline plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Component/s: docker-workflow-plugin
    • Labels:
    • Environment:
      Jenkins ver. 2.19.4
      CloudBees Docker Build and Publish plugin 1.3.2
      Docker Pipeline 1.9.1
      Running on Ubuntu 16.04
    • Similar Issues:

      Description

      The `--force` flag is still being set to true for Pipeline Docker build and publish steps. I'm running into the issue when executing a job to build and publish an image to a registry:
      + docker tag --force=true foo:tag foo:tag
      unknown flag: --force
      See 'docker tag --help'.
      The relevant bit from my Jenkinsfile:
      node {
      stage('deploy')

      { git branch: 'feature/branch', credentialsId: 'foo-key', url: 'git@github.com:bar/baz.git' withDockerRegistry([credentialsId: 'ecr:us-east-1:foo-key', url: 'https://etcetera/']) { docker.image('foo:tag').push() }

        Attachments

          Activity

          Hide
          wduda Wojciech Duda added a comment -

          I actually created a pull request for JENKINS-42152 already, hopefully my code is solid enough to be accepted.

          Show
          wduda Wojciech Duda added a comment - I actually created a pull request for JENKINS-42152 already, hopefully my code is solid enough to be accepted.
          Hide
          daleretto Maksim Skutin added a comment -

          I actually added +1 to your pull request, looking forward for a review.

          Show
          daleretto Maksim Skutin added a comment - I actually added +1 to your pull request, looking forward for a review.
          Hide
          jovandeginste Jo Vandeginste added a comment -

          Wojciech Duda, I'm not sure your code works; I get this error:

           

          + docker version --format '{{.Client.Version}}'
          [...]
          groovy.lang.MissingPropertyException: No such property: dockerVersion for class: org.jenkinsci.plugins.docker.workflow.Docker
          

           

           

          Show
          jovandeginste Jo Vandeginste added a comment - Wojciech Duda , I'm not sure your code works; I get this error:   + docker version --format '{{.Client.Version}}' [...] groovy.lang.MissingPropertyException: No such property: dockerVersion for class: org.jenkinsci.plugins.docker.workflow.Docker    
          Hide
          sa_jbrooks Jack Brooks added a comment -

          John Hovell, as the other posters point out, this is definitely still an issue, and- at least for me- isn't just a warning or the last message in the log. Hopefully Wojciech Duda's PR will get merged (with any needed changes).

          Show
          sa_jbrooks Jack Brooks added a comment - John Hovell , as the other posters point out, this is definitely still an issue, and- at least for me- isn't just a warning or the last message in the log. Hopefully Wojciech Duda 's PR will get merged (with any needed changes).
          Hide
          wduda Wojciech Duda added a comment -
          Show
          wduda Wojciech Duda added a comment - Jo Vandeginste Jack Brooks Pull request for https://issues.jenkins-ci.org/browse/JENKINS-42152  will be updated today.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sa_jbrooks Jack Brooks
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: