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
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 |
Component/s | New: core [ 15593 ] | |
Component/s | Original: parameterized-trigger [ 15592 ] | |
Component/s | Original: build-environment [ 17667 ] | |
Assignee | Original: huybrechts [ huybrechts ] |
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 |
Priority | Original: Major [ 3 ] | New: Minor [ 4 ] |
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 |
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 |
This seems to be a known issue affecting variables that have already been defined, as Jenkins treats them case-insensitive but case-preserving.
If you remove the PARA2 parameter and `echo $para2`, it will output something, correct?