There is now  a replaceAction() where you can just pass a new action 
(Parameter) with the same name and it will replace it :)

http://javadoc.jenkins-ci.org/hudson/model/Actionable.html#replaceAction%28hudson.model.Action%29

On Friday, August 3, 2012 at 5:52:17 PM UTC+2, Reuben Gow wrote:
>
> Hi,
>
> I have a job that takes a number of parameters (version_number, 
> release_number, branch etc). This build can be built in a number of ways, 
> some need to get the values of these parameters from other locations. the 
> different modes are:
>
> 1) Manually - Take the passed in parameters
> 2) SCM Change - take the parameter values from the last successful build 
> of another job
> 3) Timer - take the parameter values from the last successful build of 
> another job
> 4) Upstream Job - take the parameters passed to it from the upstream job.
>
> 1 is obviously no problem, as is 4 with the use of the Parameterized build 
> plugin.
>
> I have written a Groovy script to retrieve the parameter values for cases 
> 2 and 3 but can't find a way to apply these values to the variables used in 
> the build step (execute shell ). I can create new parameters and access 
> these as variables but I don't really like this method as it makes my shell 
> script a bit ugly. 
>
> Does anyone know how to overwrite parameter values from within the Groovy 
> script.
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/71918569-5106-4173-a58a-1128c54379f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to