blog.relativt.net

Eirik's public note to self

1 December 2011

How to trigger a Jenkins build from command-line

by Eirik Tenold

To trigger a Jenkins build from command-line is pretty simple. In *nix, you can use wget to trigger the build via a HTTP request. If you don’t have that kind of tool available on your platform (e.g. Windows), the CLI-client is a useful option.

First you need to download the client jar file; you can get this from http://<your Jenkins server>/cli. Place the jar file in an accessible location.

To start the build, just issue the command:

java -jar jenkins-cli.jar -s http://<your Jenkins server>/ build <project name>
tags: Java - Jenkins