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

Spaces in the path when the configuration axis values have spaces

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • Ubuntu Linux 12.10 (Quantal)
      Official Ubuntu Jenkins packages (Jenkins ver. 1.466.2)

      When using a multi-configuration job, with a Configuration Matrix, if the axis values have spaces then those spaces appear in the directory used for the source code checkout. Although most builds should be able to cope with it, it's fairly unusual and an obstacle when the build cannot handle it yet.

      For instance, I have this axis name:
      configureoptions
      and these axis values:
      "--disable-calendar --disable-weather"
      ""

      (Which I pass to our ./autogen.sh in the "Execute Shell" build step.)

      Then the spaces in the path cause our build to fail:

      make[4]: Leaving directory `/var/lib/jenkins/workspace/evolution-data-server/configureoptions/--disable-calendar --disable-weather/camel'
      Making all in providers
      make[4]: Entering directory `/var/lib/jenkins/workspace/evolution-data-server/configureoptions/--disable-calendar --disable-weather/camel/providers'
      Making all in pop3
      make[5]: Entering directory `/var/lib/jenkins/workspace/evolution-data-server/configureoptions/--disable-calendar --disable-weather/camel/providers/pop3'
      CC libcamelpop3_la-camel-pop3-engine.lo
      CC libcamelpop3_la-camel-pop3-folder.lo
      CC libcamelpop3_la-camel-pop3-provider.lo
      CC libcamelpop3_la-camel-pop3-settings.lo
      CC libcamelpop3_la-camel-pop3-stream.lo
      CC libcamelpop3_la-camel-pop3-store.lo
      CCLD libcamelpop3.la
      /bin/sed: unrecognized option '--disable-weather/camel/libcamel-1.2.la'
      Usage: /bin/sed [OPTION]...

      {script-only-if-no-other-script}

      [input-file]...

          [JENKINS-15896] Spaces in the path when the configuration axis values have spaces

          The help hint (via the ? button) says:
          "Values assigned to variables. Multiple values are separated by whitespace or newlines. Use shell quoting syntax for a value that contains whitespace."
          so I tried using \ to escape the space, like so:
          "--disable-calendar\ --disable-weather"
          ""

          But after saving and reloading the configure page, the \ is gone. And the same path is used for the git checkout.

          Murray Cumming added a comment - The help hint (via the ? button) says: "Values assigned to variables. Multiple values are separated by whitespace or newlines. Use shell quoting syntax for a value that contains whitespace." so I tried using \ to escape the space, like so: "--disable-calendar\ --disable-weather" "" But after saving and reloading the configure page, the \ is gone. And the same path is used for the git checkout.

          I want to do something similar with my builds, but am running into this same issue. It seems that the help box tells us to use shell quoting syntax, which Jenkins then discards in favor of what it thinks we meant.

          Ken Raffenetti added a comment - I want to do something similar with my builds, but am running into this same issue. It seems that the help box tells us to use shell quoting syntax, which Jenkins then discards in favor of what it thinks we meant.

          Drew Horn added a comment -

          This is still a bug, is the matrix configurations feature still supported? Using "sometext\ someadditionaltext" doesn't work. When saving in the UI (latest Jenkins version) it's broken up into two lines.

          Drew Horn added a comment - This is still a bug, is the matrix configurations feature still supported? Using "sometext\ someadditionaltext" doesn't work. When saving in the UI (latest Jenkins version) it's broken up into two lines.

            Unassigned Unassigned
            murrayc Murray Cumming
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: