-
Add client credentials to Jenkins server:
i. Create public key of client machine use
ssh-keygen
if it doesn't exist, see note " Login SSH Server without Password " for details;i. open "http://10.0.2.74:8088/me/configure";
i. Add "SSH Username with password" in Credentials section with username and password of the client machine;
i. In "SSH Public Keys", add all content in ~/.ssh/id_rsa.pub on client machine;
Verify credentials with java -jar jenkins-cli.jar -s http://10.0.2.74:8088/ who-am-i
;
Ref: Section "Working with Credentials" in https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
- Save Jenkins jobs in xml files:
On client machine: java -jar jenkins-cli.jar -s http://10.0.2.74:8088/ get-job ESB > ESB_jenkins.xml
- Restore Jenkins jobs from xml files:
On client machine: java -jar jenkins-cli.jar -s http://10.0.2.74:8088/ create-job ESB < ESB_jenkins.xml
;
Ref:
http://stackoverflow.com/questions/8424228/export-import-jobs-in-jenkins