Jenkins Migration Job

Source: Internet
Author: User
Description: Migrating an existing job from a Jenkins server A to another Jenkins Server B. Method: can copy or move build jobs between instances of projects simply enough by copying or moving the build job Directo Ries to the new Jenkins instance.
The steps are as follows: 1. First confirm the job storage directory of Jenkins. Log in to Jenkins with the Administrator account and click on "System Management/System settings" to confirm the Jenkins working directory. In this example, the working directory of Jenkins A is/home/.jenkins, and the working directory of Jenkins B is/root/.jenkins.
2. Next, migrate the jobs directory. Log in to the Jenkins a server, enter the working directory, compress the jobs directory, and copy to B:
Cd/home/.jenkins tar-czvf jobs.tar.gz jobs scp-f Jobs.tar root@bip:/root/.jenkins/
3. Then, unzip Jobs.tar to the jobs directory on B and restart Jenkins Server B. Note: Rebooting is not required. 1) Load the newly migrated job by restarting Hudson:
Cd/root/.jenkins TAR-ZXVF Jobs.tar This example restarts Jenkins by restarting the Tomcat service, and the other reboots process that runs Jenkins through the jar.
cd/opt/tomcat/tomcat7/bin/./shutdown.sh./startup.sh 2) does not require a restart: just go to the Manage Jenkins screens and click on Reload C Onfiguration from

Disk. This would load the new jobs and make them immediately visible on the Jenkins dashboard.


When you click the "Read Settings" button in the red box above, the following information is displayed:

4. Finally, verify that the migrated new job is loaded on B and that the job needs to be configured. 1) After logging in to Jenkins B, we find that jobs on a has been migrated correctly. As follows:

5, precautions 1) Modify the configuration of the job: since the job setup was performed on a node of Jenkins A, if you want it to be executed on a node of Jenkins B, you need to check the configuration of the job "Restrict where this project can Be run, set the node for the job to run.

2) Plugin: If a plugin is installed on Jenkins A, and B is not, the migrated task may also need to install the plug-in on a. There is a few gotchas, however. If you is migrating your jobs to a brand new Jenkins configuration, remember to install, or migrate, the plugins from R Original server. The plugins can found in the plugins directory, so you can simply copy everything from this directory to the correspond ing directory in your new instance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.