Quantcast

How to trigger a Jenkins job with parameters?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to trigger a Jenkins job with parameters?

Arve Knudsen
Hi

How can I trigger a Jenkins job with certain parameters from an external program? Parameter values can potentially be quite large, so the parameter passing method should reflect this.

Thanks,
Arve
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to trigger a Jenkins job with parameters?

mkendzior
Hi,
I can think of a couple of options.
1. You can start a build job with parameters through a URL  ie.
http://server/job/myjobname/buildWithParameters?PARM1=Value1&PARM2=Value2

2. You can use the Command line interface to start a job.  Run the
following command to get information on the build option.
java -jar c:\hudson\hudson-cli.jar -s http://server build

Mark

On Feb 4, 6:43 am, Arve Knudsen <[hidden email]> wrote:
> Hi
>
> How can I trigger a Jenkins job with certain parameters from an external
> program? Parameter values can potentially be quite large, so the parameter
> passing method should reflect this.
>
> Thanks,
> Arve
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to trigger a Jenkins job with parameters?

Mirko Friedenhagen-3
In reply to this post by Arve Knudsen
On Fri, Feb 4, 2011 at 2:43 PM, Arve Knudsen <[hidden email]> wrote:
> Hi
> How can I trigger a Jenkins job with certain parameters from an external
> program? Parameter values can potentially be quite large, so the parameter
> passing method should reflect this.

Hello there,

I wrote a short blog entry on how to use curl to issue a POST request:

http://illegalstateexception.blogspot.com/2010/11/triggering-hudson-parameterized-builds.html

Regards
Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to trigger a Jenkins job with parameters?

Arve Knudsen
In reply to this post by mkendzior
Hi Mark

On Fri, Feb 4, 2011 at 7:59 PM, mark_kendzior <[hidden email]> wrote:
Hi,
I can think of a couple of options.
1. You can start a build job with parameters through a URL  ie.
http://server/job/myjobname/buildWithParameters?PARM1=Value1&PARM2=Value2

2. You can use the Command line interface to start a job.  Run the
following command to get information on the build option.
java -jar c:\hudson\hudson-cli.jar -s http://server build
 
Thanks for the tips :) Are these methods documented somewhere on the Jenkins site?

Arve
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to trigger a Jenkins job with parameters?

Arve Knudsen
In reply to this post by Mirko Friedenhagen-3
Hi Mirko

On Fri, Feb 4, 2011 at 10:18 PM, Mirko Friedenhagen <[hidden email]> wrote:
On Fri, Feb 4, 2011 at 2:43 PM, Arve Knudsen <[hidden email]> wrote:
> Hi
> How can I trigger a Jenkins job with certain parameters from an external
> program? Parameter values can potentially be quite large, so the parameter
> passing method should reflect this.

Hello there,

I wrote a short blog entry on how to use curl to issue a POST request:

http://illegalstateexception.blogspot.com/2010/11/triggering-hudson-parameterized-builds.html

Thanks for sharing your findings, this could be very useful! I was thinking that uploading a file of properties would be the way to go, if possible. With your method, though, how does the uploaded properties file get exposed to the triggered project? Are the contained properties simply translated into job parameters (available as environment variables)?

Thanks,
Arve
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to trigger a Jenkins job with parameters?

scrandell
In reply to this post by Arve Knudsen


On Sat, Feb 5, 2011 at 2:18 AM, Arve Knudsen <[hidden email]> wrote:
 
Thanks for the tips :) Are these methods documented somewhere on the Jenkins site?

Arve


Thoroughly.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to trigger a Jenkins job with parameters?

Arve Knudsen
On Sat, Feb 5, 2011 at 12:13 PM, Steven Crandell <[hidden email]> wrote:


On Sat, Feb 5, 2011 at 2:18 AM, Arve Knudsen <[hidden email]> wrote:
 
Thanks for the tips :) Are these methods documented somewhere on the Jenkins site?

Arve


Thoroughly.

Aha, there we have it. Thanks! I must've missed it when I was digging through the documentation earlier.

Arve
Loading...