java -jar jenkins-cli.jar -s http://<jenkinshost>/ create-job <jobname> --username <admin name> --password <admin passwd> < config.xml
将要使用CLI命令有:
- create-job: Creates a new job by reading stdin as a configuration XML file.
- delete-job: Deletes a job
- update-job: Updates the job definition XML from stdin. The opposite of the get-job command
jenkins-cli
原文:http://www.cnblogs.com/SZLLQ2000/p/5286544.html