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

Strange quote rules for parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • prescmbuildstep-plugin

      I have a "String parameter" named GIT_BRANCH_NAME.

      If I have the following shell code for the pre-SCM:

      export | sort
      ...
      if [ x${GIT_BRANCH_NAME} != "xdevelop" ]; then
        export BRANCHNAME=" (${GIT_BRANCH_NAME})"
      fi
      

      then the result includes

      export GIT_BRANCH_NAME="\${GIT_BRANCH_NAME}"
      

      BUT if I force a quote around the parameter name:

      export | sort
      ...
      if [ x"${GIT_BRANCH_NAME}" != "xdevelop" ]; then
        export BRANCHNAME=" (${GIT_BRANCH_NAME})"
      fi
      

      I get the expected results:

      export GIT_BRANCH_NAME="develop"
      

      This could be envinject causing the problems as well.

            Unassigned Unassigned
            aarondmarasco_vsi Aaron D. Marasco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: