[
https://issues.jenkins-ci.org/browse/JENKINS-12415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159486#comment-159486
]
cjo9900 commented on JENKINS-12415:
-----------------------------------
We are using using the parameters from one job to 5 chained jobs after that,
with no issues at all.
Two possible issues here
1. parameter values not passed from job A -> job B
Look like you config is incorrect from the screen shots
To pass just one of the parameters to the other jobs using the predefined
parameters item you need to specify
BUILD_JAVA=$BUILD_JAVA
To pass all current parameters to it you should "Current build parameters" when
adding the parameters
2. Exported variable from shell not passed to called jobs.
When doing export BUILD_JAVA=1 from a shell script this does not get passed
back into the job environment setting so these are only used within the context
of that shell script and spawned processes.
To show this add a second shell build step and print the environment variables
using env an then check for the exported item, you will see it is not present.
To pass these values along to later build steps print them to a file in the
standard parameter format of KEY=VALUE and then use the EnvInject plugin build
step to add them to the run environment from the file created
Suggest closing the error as there is no real changes that can be made to
change the current behaviour as it is a known core issue with a solution as
defined above
> Build script variables are not available in Predefined parameters
> ------------------------------------------------------------------
>
> Key: JENKINS-12415
> URL: https://issues.jenkins-ci.org/browse/JENKINS-12415
> Project: Jenkins
> Issue Type: Bug
> Components: parameterized-trigger, run-condition
> Affects Versions: current
> Environment: Ubuntu 10.04.3
> Reporter: sherban drulea
> Assignee: huybrechts
> Attachments: PARAMETERIZED BUILD.png, TEST BUILD.png
>
>
> Build script variables are *not* passed to parameterized builds via the
> "Predefined parameters".
> To test:
> 1.) Create TEST build with Execute shell: export BUILD_JAVA=1
> 2.) Trigger/call builds on other projects (parameterized build expecting
> BUILD JAVA)
> 3.) Set $BUILD_JAVA as "Predefined parameters"
> 4.) 1 is *not* passed to the parameterized build!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira