Tuesday, April 9, 2013

Interact with Jenkins through Jenkins.jar

Interact with Jenkins through Jenkins.jar


https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTdi94ODgrLWV6OaI5CxKqXkhuZlxjhVP13i7ezOYWSdOWY5OGURZIePzh0

To get the help commands from Jenkins,

java -jar /Users/users/Downloads/jenkins-cli.jar -s http://localhost:8080/jenkins/ help

Results will be like




Trigger a build from terminal

java -jar /Users/user/Downloads/jenkins-cli.jar -s http://localhost:8080/jenkins/ build DemoJob

Jenkins-cli jar can be downloaded from http://localhost:8080/jenkins/cli

Environment variable values can be accessed from shell($FOO, %FOO%) and Ant ( ${env.FOO} )  like

The parameter are available as environment parameters. So e.g. a shell ($FOO, %FOO%) or Ant ( ${env.FOO} ) can access these values.

https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build






--
Thank you.


Regards,
Kaleeswaran.S
  

No comments:

Post a Comment