How to trigger Jenkins builds remotely and to pass parameters

Exploring picture Exploring · Dec 3, 2013 · Viewed 126.6k times · Source

I am invoking a Jenkins job remotely using:

wget http://<ServerIP>:8080/job/Test-Jenkins/build?token=DOIT

Here Test-Jenkins job is invoked and DOIT is the security token that I have used.

Now I need to pass some parameters to the build.xml file of this job i.e. Test-Jenkins.

I have not yet figured out how to pass the variables yet.

Answer

Peter Schuetze picture Peter Schuetze · Dec 3, 2013

See Jenkins documentation: Parameterized Build

Below is the line you are interested in:

http://server/job/myjob/buildWithParameters?token=TOKEN&PARAMETER=Value