Tuesday, June 2, 2020

Migrate jenkins jobs from one server to another | Migrate Jenkins jobs from one Jenkins server to another Jenkins server

How to migrate Jenkins jobs from one Jenkins instance to another Jenkins instance?
Jenkins jobs can be migrated in many ways. You can establish SSH connection b/w source machine and target machine and use scp command to copy from one instance to another instance. You can also use Job import plug-in to migrate jobs.


Make sure you install Job Import plugin in target Jenkins instance.

Steps to migrate jobs from source Jenkins to Target Jenkins instance:

Make sure you have right Jenkins source URL by logging to Source Jenkins.
Click on Manage Jenkins --> Configure System
Copy the Jenkins URL.
Logout from source Jenkins.

Steps in Target Jenkins
1. Login to Target Jenkins
2. Go to Manage Jenkins -->configure system--> click on Job import plug-in
Add source Jenkins url and login credentials.

3. Click on Save
4. Go to Jenkins -->Job Import plug-in
 5. Select source Jenkins from down and check search into folder option
  click on Query

6. Now it should pull all the jobs, choose the jobs you would like to migrate and click on Import.
Make sure you choose install required plug-ins option as well.
 Now you should see the message.
7. Go to Jenkins home page and refresh it. You should see the jobs migrated successfully.
You can watch these steps in my YouTube channel as well:

Note: Please note that Credentials will not be migrated, only Jobs and plug-ins will be migrated.

No comments:

Post a Comment