How can I exchange jobs between 2 different Jenkins instances?

0 votes
I'm searching for a way to export/import jobs in Jenkins. Is it possible?
Jul 6, 2018 in Jenkins by Tyrion anex
• 8,280 points
29 views

1 answer to this question.

0 votes
java -jar jenkins-cli.jar -s http://server get-job myjob > myjob.xml
java -jar jenkins-cli.jar -s http://server create-job newmyjob < myjob.xml

create-job:

This creates a new job by reading stdin as a configuration XML file

get-job:

This dumps the job definition XML to stdout

answered Jul 6, 2018 by Sophie may
• 9,410 points

Related Questions In Jenkins

0 votes
1 answer

How can I create global macros and templates in jenkins job builder?

you can append the path to the ...READ MORE

answered Apr 2, 2018 in Jenkins by ajs3033
• 7,240 points
241 views
0 votes
1 answer

How Can I measure Jenkins Build Performance?

If you go to the Jenkins page ...READ MORE

answered Jul 16, 2018 in Jenkins by Kalgi
• 2,620 points
35 views
0 votes
1 answer

How can I point Jenkins to another .jenkins home directory?

I think this can help you out. Set ...READ MORE

answered Jul 19, 2018 in Jenkins by Kalgi
• 2,620 points
138 views
0 votes
2 answers

How can I make Jenkins CI with Git trigger on pushes to master?

Generic webhook trigger can be useful When configured ...READ MORE

answered Aug 13, 2018 in Jenkins by lina
• 8,100 points
86 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

How to start Jenkins on a different port rather than 8080?

This is simple, use the following command: java ...READ MORE

answered Jul 4, 2018 in Jenkins by Sophie may
• 9,410 points
1,052 views