|
Starting 1.302, Hudson has a built-in CLI client that allows you to access Hudson from a script or from your shell. This is convenient for automation of routine tasks, bulk updates, trouble diagnosis, and so on. Obtaining CLIHudson CLI is distributed inside hudson.war. Download it from http://yourserver.com/jnlpJars/hudson-cli.jar. In theory, the CLI jar is dependent on the version of Hudson, but in practice, we expect to be able to retain compatibility between different versions of Hudson. Running CLIThe general syntax is as follows (the design is similar to tools like svn/git): java -jar hudson-cli.jar [-s HUDSON_URL] command [options...] [arguments...] HUDSON_URL can be specified via the environment variable $HUDSON_URL. The 'help' command will give you the list of the available commands, which depends on the server you are talking to. Extending CLIPlugins installed on Hudson server can add custom CLI commands to Hudson. See Writing CLI commands for more details. Working with CredentialsHudson CLI does not support credentials at the moment. If you have secured your Hudson installation (login with username and password) you just get a java.io.IOException: Server returned HTTP response code: 403 for URL: http://HUDSON_SERVER/cli Adding this feature is on the list. |
Comments (6)
May 05, 2009
Rémy EVEN says:
What about protocol and port using by hudson-cli ? ThanksWhat about protocol and port using by hudson-cli ?
Thanks
May 19, 2009
Frederic Jean says:
Is it possible to pass credentials to hudson-cli?Is it possible to pass credentials to hudson-cli?
Feb 04, 2010
benson margulies says:
Can I pass parameters to the 'build' command?Can I pass parameters to the 'build' command?
Apr 09
Axel Heider says:
Is there a list of commands that can be used? I did not find anything, so if the...Is there a list of commands that can be used? I did not find anything, so if there is something a link in the Wiki page would help.
May 03
Jes struck says:
use help as a command the it's self documenteduse help as a command the it's self documented
May 24
Thomas Matthijs says:
The correct HUDSON_URL is your-url + "/cli", if you go that address the example ...The correct HUDSON_URL is your-url + "/cli", if you go that address the example there will even lie to you (not including /cli)