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

Build parameters not passed correctly into build step

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • core
    • None
    • Hudson 1.352

      I specified a build parameter in the job as

      This build is parameterized
      Choice
      Name: HUDSON_BUILD_COMMAND
      Choices: 'distrib_script --no-create-distrib-tar-file --create-update-tar-file --rsync-update-rsa'

      I.e. including the single quotes, as I need them.

      Then I have th build step

      Execute Shell
      Command: scripts/hudson_build.sh $HUDSON_BUILD_COMMAND

      When looking at the console output, I get

      [builddir] $ sh -xe /tmp/hudson37649.sh
      + scripts/hudson_build_.sh ''\''distrib_script' --no-create-distrib-tar-file --create-update-tar-file '--rsync-update-rsa'\'''
      

      I.e. the build command is totally messed up with the quoting! And thus my build fails.
      What I want to be executed in the shell would be:

        scripts/hudson_build_.sh 'distrib_script --no-create-distrib-tar-file --create-update-tar-file --rsync-update-rsa'
      

      Is it possible that Hudson passes the parameters unchanged?

            Unassigned Unassigned
            illenseer illenseer
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: