If you are triggering a build from within your Action using the AbstractProject.scheduleBuild()[1] then pass your own generated ParametersAction, as the third item, containing the required parameters. Note: Default parameters from the triggered job are not added if they are not passed in. issue JENKINS-13768 [2] which has a pull request pending [3].
[1] http://javadoc.jenkins-ci.org/hudson/model/AbstractProject.html#scheduleBuild(int, hudson.model.Cause, hudson.model.Action...) [2] https://issues.jenkins-ci.org/browse/JENKINS-13768 [3] https://github.com/jenkinsci/jenkins/pull/553 Chris On Thursday, 9 May 2013 07:19:42 UTC+1, Ronni Elken Lindsgaard wrote: > > Hi Kenny > > Thanks for your reply. > > Unfortunately, the Parameterized Trigger Plugin still forces my original > job to be configured with parameters - My plugin "knows" the names and > types of the parameters, so it would be tedious for a user to have to set > up the same parameters each time a job is configured. > > The thing is, I have a remote repository where I would like to grab a > specific revision to build, so I would like a parameter named revision (as > well as some other standard parameters such as who triggered it and > similar). > I am hoping it is possible to give the a build some information when i > trigger it. I know how to trigger it, but it cannot get my head around > giving it extra environment variables, a log message or any other possible > option. (maybe i can pass some information in an action with the > scheduleBuild2 method?) > > > On 9 May 2013 01:19, Kenny Ayers <[email protected] <javascript:>>wrote: > >> Hey Ronni, >> >> Take a look at installing this plugin: >> https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin >> >> That will allow you to trigger a downstream job using parameters from a >> given build. I'm not entirely sure that's what you've asked for in your >> inquiry, but it may be helpful. >> >> -Kenny >> >> >> On Wednesday, May 8, 2013 12:48:11 AM UTC-7, Ronni Elken Lindsgaard wrote: >>> >>> >>> >>> Den onsdag den 8. maj 2013 09.44.33 UTC+2 skrev Ronni Elken Lindsgaard: >>>> >>>> I would like to be able to trigger a build from an action, and at the >>>> same time give it a specific parameter. >>>> >>>> It is the same functionality as with a parametrized build. However, I >>>> would like my plugin to do this automatically, such that the user does not >>>> need to set up the parameters for the build manually. >>>> >>>> I could probably use a semaphore file, but it would be great if it was >>>> possible to pass it directly. >>>> >>> >>> Forgot my question: Is it possible to give the build these parameters? >>> And how? >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Jenkins Developers" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-dev/_w6ysAEk5hk/unsubscribe?hl=en >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Mvh > Ronni Elken Lindsgaard > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" 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.
