Jenkins Migration Job

Source: Internet
Author: User
Tags tomcat
Description: Migrate an existing job from a Jenkins server A to another Jenkins Server B. Method: You can copy or move build jobs between instances of projects simply enough to copying or moving the build job Directo Ries to the new Jenkins instance.
The specific steps are as follows: 1, first confirm Jenkins job storage directory. Login Jenkins with Admin account, click "System Management/System Setup" to confirm Jenkins working directory. In this example, the working directory for Jenkins A is/home/.jenkins, and Jenkins B's working directory is/root/.jenkins.
2. Next, migrate the jobs directory. Login to Jenkins a server, enter working directory, compress 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, on B to extract Jobs.tar to the jobs directory, and restart Jenkins Server B. Note: Reboot is not required. 1 to load the newly migrated job by restarting Hudson:
Cd/root/.jenkins TAR-ZXVF Jobs.tar This example restarts the Jenkins by restarting the Tomcat service, and other restart processes that run Jenkins through the jar.
cd/opt/tomcat/tomcat7/bin/./shutdown.sh./startup.sh 2) does not require a reboot: 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.


Click the Read Settings button in the Red box above to display the following information:

4. Finally, verify that the migrated new job has been loaded on B and that the job needs to be configured. 1 after logging in to Jenkins B, I found jobs in a has migrated correctly. As follows:

5, note 1) Modify the configuration of the job: Because the previous job setting was performed on a node of Jenkins A, you would need to check the configuration of the job if you wanted it to be executed on a node Jenkins B Restrict where this project can Be run to set the node for the job to run.

2 plugin: If Jenkins a plugin installed, and B does not, the migrated tasks may also need to install a plug-in. There are a few gotchas, however. If you are are migrating your jobs to a brand new Jenkins configuration, remember to install, or migrate, the plugins from R Original server. The plugins can is found in the plugins directory, so 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.