[英]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 . 最安全的解决方案是使用Job Import插件 。
Install this plugin on the Linux server, and next import the job from the Windows Jenkins URL :) 在Linux服务器上安装此插件,然后从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. 您还可以使用一些智能.gitignore(或任何您选择的SCM)检入Job的配置,并将%JENKINS_HOME%用作所选SCM中的签入目录和版本控制目录。
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). 作业配置是与操作系统无关的,尽管作业本身可能具有特定于操作系统的脚本(如果您使用Shell脚本而不是mvn pom文件/ 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. 然后,您只需将签入的作业仓库签出到新的Linux主机的$ jenkins_home目录中,然后启动jenkins。 all your jobs should be found and added to your linux jenkins (with out the need for a plugin).
您应该找到所有工作并将其添加到您的linux jenkins中(无需插件)。
Generally speaking... the less plugins, the more stable your Jenkins install will be. 一般来说,插件越少,您的Jenkins安装就越稳定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.