How to Import Export Jobs Jenkins

Introduction

In this tutorial, How to Import Export jobs, Jenkins. It is easy to import and export Jenkins jobs and plugin when you migrate Jenkins jobs to a new server. I use Butler CLI. Jenkins the essential for DevOps Roles.

To get butler package for your system Linux. Link butler download.

Install butler

wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/linux/butler
chmod +x butler
mv butler /usr/local/bin/

To verify the Bulter

/usr/local/bin/butler help

Import Export Jobs Jenkins

OLD SERVER

To export Jenkins plugins

/usr/local/bin/butler plugins export  --server localhost:8080  --username admin  --password admin

Butler will dump a list of plugins installed to new file “plugins.txt”

To export Jenkins jobs

/usr/local/bin/butler jobs export  --server localhost:8080  --username admin  --password admin

A new directory “jobs” will be created with every job in Jenkins. Each job it owns configure file config.xml

NEW SERVER

To import Jenkins plugins

/usr/local/bin/butler plugins import  --server localhost:8080  --username admin  --password admin

To import Jenkins jobs

/usr/local/bin/butler jobs import  --server localhost:8080  --username admin --password admin

Another method, you can refer to from StackOverflow

Conclusion

Throughout the article, you can use “Import Export Jobs Jenkins” as mentioned above. I hope this will be helpful to you. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology, especially Devops Skill such as Docker, vagrant, git, and so forth. I like open-sources, so I created DevopsRoles.com to share the knowledge I have acquired. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.