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

Accessing parameters of triggered build has strange syntax

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core
    • Jenkins version 1.579, Linux RHEL6

      It seems that accessing parameters with build command 'Execute shell' has strange syntax when building with URL request and multiple parameters.

      For example, when I trigger my build with URL:
      http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

      and try to echo those string parameters, I need to use the following syntax:
      echo $PARA1
      echo ${para2}

      For example this alternative doesn't work. It is echoing only blank values:
      echo ${para1}
      echo $PARA2

      This seems to be somewhat similar to this:
      https://issues.jenkins-ci.org/browse/JENKINS-16639

          [JENKINS-25020] Accessing parameters of triggered build has strange syntax

          Kaaleppi Kekkola created issue -
          Kaaleppi Kekkola made changes -
          Description Original: It seems that build command 'Execute shell' loses some parameter data when building with URL request and multiple parameters.

          For example, when I trigger my build with URL:
          http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

          and try to echo those parameters:
          echo $PARA1
          echo $PARA2

          only the first parameter is echoed correctly and the other one is blank.

          Alternatively if I echo only PARA2 then it is echoed correctly.

          This seems to be somewhat similar to this:
          https://issues.jenkins-ci.org/browse/JENKINS-16639
          New: It seems that build command 'Execute shell' loses some parameter data when building with URL request and multiple parameters.

          For example, when I trigger my build with URL:
          http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

          and try to echo those parameters:
          echo $PARA1
          echo $PARA2

          only the first parameter is echoed correctly and the other one is blank.


          This seems to be somewhat similar to this:
          https://issues.jenkins-ci.org/browse/JENKINS-16639
          Daniel Beck made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: parameterized-trigger [ 15592 ]
          Component/s Original: build-environment [ 17667 ]
          Assignee Original: huybrechts [ huybrechts ]
          Kaaleppi Kekkola made changes -
          Description Original: It seems that build command 'Execute shell' loses some parameter data when building with URL request and multiple parameters.

          For example, when I trigger my build with URL:
          http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

          and try to echo those parameters:
          echo $PARA1
          echo $PARA2

          only the first parameter is echoed correctly and the other one is blank.


          This seems to be somewhat similar to this:
          https://issues.jenkins-ci.org/browse/JENKINS-16639
          New: It seems that accessing parameters with build command 'Execute shell' has strange syntax when building with URL request and multiple parameters.

          For example, when I trigger my build with URL:
          http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

          and try to echo those parameters, I need to use the following syntax:
          echo $PARA1
          echo ${para2}

          For example this alternative doesn't work:
          echo ${para1}
          echo $PARA2


          This seems to be somewhat similar to this:
          https://issues.jenkins-ci.org/browse/JENKINS-16639
          Summary Original: Triggered build with parameters empties some parameters New: Accessing parameters of triggered build has strange syntax
          Kaaleppi Kekkola made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]
          Kaaleppi Kekkola made changes -
          Description Original: It seems that accessing parameters with build command 'Execute shell' has strange syntax when building with URL request and multiple parameters.

          For example, when I trigger my build with URL:
          http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

          and try to echo those parameters, I need to use the following syntax:
          echo $PARA1
          echo ${para2}

          For example this alternative doesn't work:
          echo ${para1}
          echo $PARA2


          This seems to be somewhat similar to this:
          https://issues.jenkins-ci.org/browse/JENKINS-16639
          New: It seems that accessing parameters with build command 'Execute shell' has strange syntax when building with URL request and multiple parameters.

          For example, when I trigger my build with URL:
          http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

          and try to echo those parameters, I need to use the following syntax:
          echo $PARA1
          echo ${para2}

          For example this alternative doesn't work echoing only blank values:
          echo ${para1}
          echo $PARA2


          This seems to be somewhat similar to this:
          https://issues.jenkins-ci.org/browse/JENKINS-16639
          Kaaleppi Kekkola made changes -
          Description Original: It seems that accessing parameters with build command 'Execute shell' has strange syntax when building with URL request and multiple parameters.

          For example, when I trigger my build with URL:
          http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

          and try to echo those parameters, I need to use the following syntax:
          echo $PARA1
          echo ${para2}

          For example this alternative doesn't work echoing only blank values:
          echo ${para1}
          echo $PARA2


          This seems to be somewhat similar to this:
          https://issues.jenkins-ci.org/browse/JENKINS-16639
          New: It seems that accessing parameters with build command 'Execute shell' has strange syntax when building with URL request and multiple parameters.

          For example, when I trigger my build with URL:
          http://server/job/myjob/buildWithParameters?token=TOKEN&PARA1=Value1&PARA2=Value2

          and try to echo those string parameters, I need to use the following syntax:
          echo $PARA1
          echo ${para2}

          For example this alternative doesn't work. It is echoing only blank values:
          echo ${para1}
          echo $PARA2


          This seems to be somewhat similar to this:
          https://issues.jenkins-ci.org/browse/JENKINS-16639
          Daniel Beck made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 158918 ] New: JNJira + In-Review [ 195927 ]

            Unassigned Unassigned
            kaaleppi Kaaleppi Kekkola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: