Jenkins迁移job
2014-08-08 14:39
323 查看
说明:从一个Jenkins服务器A将现有job迁移到另外一个Jenkins服务器B。方法:You can copy or move build jobs between instances of projects simply enough by copying or moving the
build job directories to the new Jenkins instance.
具体步骤如下:1、首先确认Jenkins的job存放目录。以管理员账号登录Jenkins,点击“系统管理/系统设置”,确认jenkins工作目录。本例中Jenkins A的工作目录为/home/.jenkins,Jenkins B的工作目录为/root/.jenkins。
2、接下来,迁移jobs目录。登录Jenkins A服务器,进入工作目录,压缩jobs目录,并复制到B:
[/code]
3、接着,在B上解压jobs.tar到jobs目录,并重启Jenkins服务器B。注意:重启不是必须的。1)通过重启hudson来加载新迁移的job:
[/code]本例通过重启tomcat服务来重启Jenkins,其他通过jar运行Jenkins的重启进程即可。
[/code]2)不需要重启:
just go to the Manage Jenkins screen and click on Reload Configuration From
Disk. This will load the new jobs and make them immediately visible on the Jenkins dashboard.
点击上述红框中的“读取设置”按钮后,显示如下信息:
4、最后,验证B上是否已经加载了迁移进来的新job,同时需要对job进行配置。1)登录到Jenkins B后,发现A上的jobs已经正确迁移进来。如下:
5、注意事项1)修改job的配置:由于之前job设置是在Jenkins A的某个节点上执行,所以如果想让它在Jenkins B的某个节点上执行,则需要检查job的配置“Restrict where this project can be run”,设置job运行的节点。
2)插件:如果Jenkins A上安装了插件,而B没有,则迁移过来的任务可能也需要安装A上的插件。
There are a few gotchas, however. If you are migrating your jobs to a brand new Jenkins configuration,
remember to install, or migrate, the plugins from your original server. The plugins can be found in
the plugins directory, so you can simply copy everything from this directory to the corresponding
directory in your new instance.
来自为知笔记(Wiz)
build job directories to the new Jenkins instance.
具体步骤如下:1、首先确认Jenkins的job存放目录。以管理员账号登录Jenkins,点击“系统管理/系统设置”,确认jenkins工作目录。本例中Jenkins A的工作目录为/home/.jenkins,Jenkins B的工作目录为/root/.jenkins。
2、接下来,迁移jobs目录。登录Jenkins A服务器,进入工作目录,压缩jobs目录,并复制到B:
cd /home/.jenkins
tar -czvf jobs.tar.gz jobs
scp -f jobs.tar root@BIP:/root/.jenkins/
[/code]
3、接着,在B上解压jobs.tar到jobs目录,并重启Jenkins服务器B。注意:重启不是必须的。1)通过重启hudson来加载新迁移的job:
cd /root/.jenkins
tar -zxvf jobs.tar
[/code]本例通过重启tomcat服务来重启Jenkins,其他通过jar运行Jenkins的重启进程即可。
cd /opt/tomcat/tomcat7/bin/
./shutdown.sh
./startup.sh
[/code]2)不需要重启:
just go to the Manage Jenkins screen and click on Reload Configuration From
Disk. This will load the new jobs and make them immediately visible on the Jenkins dashboard.
点击上述红框中的“读取设置”按钮后,显示如下信息:
4、最后,验证B上是否已经加载了迁移进来的新job,同时需要对job进行配置。1)登录到Jenkins B后,发现A上的jobs已经正确迁移进来。如下:
5、注意事项1)修改job的配置:由于之前job设置是在Jenkins A的某个节点上执行,所以如果想让它在Jenkins B的某个节点上执行,则需要检查job的配置“Restrict where this project can be run”,设置job运行的节点。
2)插件:如果Jenkins A上安装了插件,而B没有,则迁移过来的任务可能也需要安装A上的插件。
There are a few gotchas, however. If you are migrating your jobs to a brand new Jenkins configuration,
remember to install, or migrate, the plugins from your original server. The plugins can be found in
the plugins directory, so you can simply copy everything from this directory to the corresponding
directory in your new instance.
来自为知笔记(Wiz)
相关文章推荐
- Jenkins迁移job
- jenkins迁移job
- jenkins迁移job插件 job-import插件
- ORACLE迁移中的一些经验(二)批量导出job,并在目标库创建
- jenkins 迁移、备份
- Get Jenkins job build queue length
- Jenkins Build Pipeline View点击Job跳转到具体某个build中
- 关于hudson上的job迁移-(job migration of hudson)
- 在Jenkins中新建项目(Job)
- Jenkins集成--构建job
- 命令行执行jenkins,构建job(可传递参数)
- jenkins multijob
- Jenkins创建job时Check-out Strategy各个选项详细说明(含图)
- 【FAQ】Jenkins的Job Description如何显示html格式?
- 使用Python命令创建jenkins的job
- Get Jenkins job build queue length
- Jenkins多项目构建:单独建立一个项目按顺序执行其它job
- 使用命令创建jenkins的job,解决jenkinsapi.custom_exceptions.JenkinsAPIException错误
- Jenkins- job之间传参
- 关于jenkins更新后, job description只显示html代码的问题