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

Syntax error when pushing image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • docker-workflow-plugin
    • None
    • version 1.9.0

      When trying to push a docker image with a new tag after previously pushing, I am seeing this error:

      `/opt/wavity/jenkins/workspace/Docker/docker/repo@tmp/durable-66b3426d/script.sh: line 3: syntax error near unexpected token \`||'`

      Which I believe is referring to this line: https://github.com/jenkinsci/docker-workflow-plugin/blob/223612bc8378cc3e02cc6fecee1416c5bd533af9/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy#L157

      Example script:

      node {
        img = docker.build("project:1.0.0-SNAPSHOT")
      	docker.withRegistry('', 'wavity-docker-hub') {
      		img.push();
      		img.push('${Branch}-SNAPSHOT-Thu') // force flag doesn't seem to fix
      	}
      }
      

            Unassigned Unassigned
            mm0 Matt M
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: