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

Jenkins Pipeline still uses --force=yes for Docker Build and Publish plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • Jenkins ver. 2.19.4
      CloudBees Docker Build and Publish plugin 1.3.2
      Running on Ubuntu 16.04

      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()
      }

            csanchez Carlos Sanchez
            sa_jbrooks Jack Brooks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: