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

Strange quote rules for parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: prescmbuildstep-plugin
    • Environment:
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          aarondmarasco_vsi Aaron D. Marasco added a comment -

          I thin this was a red herring and I have other problems.

          Show
          aarondmarasco_vsi Aaron D. Marasco added a comment - I thin this was a red herring and I have other problems.

            People

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

              Dates

              Created:
              Updated:
              Resolved: