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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • docker-workflow-plugin
    • Jenkins ver. 2.19.4
      CloudBees Docker Build and Publish plugin 1.3.2
      Docker Pipeline 1.9.1
      Running on Ubuntu 16.04

    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

          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.

          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.
          daleretto Maksim Skutin added a comment -

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

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

          wduda, 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
          

           

           

          jovandeginste Jo Vandeginste added a comment - wduda , 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    
          sa_jbrooks Jack Brooks added a comment -

          jhovell, 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 wduda's PR will get merged (with any needed changes).

          sa_jbrooks Jack Brooks added a comment - jhovell , 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 wduda 's PR will get merged (with any needed changes).
          wduda Wojciech Duda added a comment - jovandeginste sa_jbrooks Pull request for https://issues.jenkins-ci.org/browse/JENKINS-42152  will be updated today.

          People

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

            Dates

              Created:
              Updated:
              Resolved: