[JIRA] (JENKINS-14739) EnvInject params are overwritten by default string params

2012-08-09 Thread benjamin.h.kersh...@lmco.com (JIRA)














































Ben Kershner
 updated  JENKINS-14739


EnvInject params are overwritten by default string params
















config.xml files for the scenario in the description.





Change By:


Ben Kershner
(09/Aug/12 4:03 PM)




Attachment:


JENKINS-14739.zip



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-14739) EnvInject params are overwritten by default string params

2012-08-09 Thread benjamin.h.kersh...@lmco.com (JIRA)














































Ben Kershner
 commented on  JENKINS-14739


EnvInject params are overwritten by default string params















I can't post my actual jobs due to security and proprietary information reasons, but I created the scenario listed above and included it in the zip.

To the best of my knowledge (I didn't build this Jenkins server from the ground up, so I'm still learning what's an out-of-the-box built-in feature and what's a plugin), I do use parameters when creating the job (built-in?), but I do not use the Parameterized Trigger Plugin.

Check JENKINS-14739.zip for the configs, and if you run them, take note of the differences in the Injected Environment Variables for each.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-14739) EnvInject params are overwritten by default string params

2012-08-08 Thread benjamin.h.kersh...@lmco.com (JIRA)














































Ben Kershner
 created  JENKINS-14739


EnvInject params are overwritten by default string params















Issue Type:


Bug



Affects Versions:


current



Assignee:


Gregory Boissinot



Components:


envinject



Created:


08/Aug/12 11:52 PM



Description:


A parameter created by EnvInject by a parent job will be overwritten by triggered jobs if a string parameter already exists.

For example:
1) A parameterized parent project exists. It has a string parameter (defaulted to one):
PARAM_SLAVE_NUMBER=1
  It creates a new parameter with EnvInject:
PARAM_SLAVE=Win7-Slave-$PARAM_SLAVE_NUMBER
  It then triggers a child project with current build paramters
2) The child project is parameterized with a string parameter as well:
PARAM_SLAVE=Win7-Slave-2
  The child project then runs a script on the node specified by PARAM_SLAVE.

The expected operation is that since string parameters should only take the default values when they're not set already (pseudocode: IF NOT EXISTS($PARAM_SLAVE) { PARAM_SLAVE=Win7-Slave-2 }), EnvInject should set PARAM_SLAVE first, and the child project should not re-set PARAM_SLAVE, however, that's not what happens. In the case above, the script will always be run on Win7-Slave-2, no matter what PARAM_SLAVE_NUMBER is set to.




Environment:


Jenkins 1.455 running on Ubuntu 11.04




Project:


Jenkins



Priority:


Major



Reporter:


Ben Kershner

























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira