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

docker command fails if project name has whitespace

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When the project name has a space in it (such as "happy days"), the plugin tries to run the command

      docker build -t imagetag /var/lib/jenkins/jobs/happy days/workspace
      

      which results in the error

      docker: "build" requires 1 argument.
      See 'docker build --help'.
      
      Usage:	docker build [OPTIONS] PATH | URL | -
      
      Build a new image from the source code at PATH
      Build step 'Docker Build and Publish' marked build as failure
      Finished: FAILURE
      

      The problem is that the space is not escaped, resulting in two arguments being passed.

      This wasn't a problem in 1.0.1 since the path was simply ".".

        Attachments

          Activity

          Hide
          nitek Claus Näveke added a comment -

          Any news on this? Currently we cannot update to 1.1 because we have quite a few project names containing spaces.

          Show
          nitek Claus Näveke added a comment - Any news on this? Currently we cannot update to 1.1 because we have quite a few project names containing spaces.
          Show
          csanchez Carlos Sanchez added a comment - Fixed in https://github.com/jenkinsci/docker-build-publish-plugin/pull/36

            People

            Assignee:
            csanchez Carlos Sanchez
            Reporter:
            deadleg William Kerrigan
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: