Issue Type: Bug 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 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

Reply via email to