![]() |
|
|
|
|
Issue Type:
|
Bug
|
|
Affects Versions:
|
current |
|
Assignee:
|
domi
|
|
Components:
|
managed-scripts |
|
Created:
|
17/May/13 10:00 PM
|
|
Description:
|
When calling a managed script with a set of arguments manage scripts does not properly resolve token macro expressions. Consider the following config.xml snip:
<org.jenkinsci.plugins.managedscripts.ScriptBuildStep plugin="[email protected]"><buildStepId>org.jenkinsci.plugins.managedscripts.ScriptConfig1368825822834</buildStepId><buildStepArgs><string>${ENV,var="JOB_NAME"}</string><string>${ENV,var="JOB_NAME"}</string><string>${ENV,var="JOB_NAME"}</string></buildStepArgs></org.jenkinsci.plugins.managedscripts.ScriptBuildStep>
Notice how it passes in the JOB_NAME as a token macro _expression_. Here is the contents of the script it is calling:
echo "hello world"
echo A $1
echo B $2
echo C $3
And here is the resulting output:
[workspace] $ /bin/sh /app/jenkins/temp/build_step_template7647665088307017903.sh
hello world
A
B
C
Notice no arguments were passed to the script, and $1, $2, $3 resolved to nothing.
In this case I used token macro to resolve an ENV variable which makes for an easy demonstration. But I also want to be able to use token macro to resolve a property in a properties file.
|
|
Project:
|
Jenkins
|
|
Priority:
|
Major
|
|
Reporter:
|
Mike Power
|
|
|
|
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
|
--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
For more options, visit
https://groups.google.com/groups/opt_out.