简体   繁体   中英

How to migrate Jenkins job from windows local machine to Linux server?

我在本地计算机(Windows)中安装了Jenkins,并使用Jenkins创建了一个新作业,它的工作原理非常完美...现在,我在一个专用的Linux Server中安装了Jenkins ...如何从Windows(本地计算机)迁移作业到Linux服务器上新安装的Jenkins?

The safest solution is to use the Job Import plugin .

Install this plugin on the Linux server, and next import the job from the Windows Jenkins URL :)

You can also check in your Job's configs with some smart .gitignore (or whatever your choice of SCM is) and use the %JENKINS_HOME% as a checked in and versioned directory in the SCM of your choice.

Job config's are OS independent, though the job itself might have OS specific scripts (if you use a shell script instead of a mvn pom file / ant build.xml).

Then you can just check out your checked in job repo to the new linux host's $jenkins_home directory and start up jenkins. all your jobs should be found and added to your linux jenkins (with out the need for a plugin).

Generally speaking... the less plugins, the more stable your Jenkins install will be.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM