本文主要是介绍jenkins迁移,并由1.6版本升级到2.13,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、官网:https://jenkins.io/doc/pipeline/tour/getting-started/
(单纯升级的话,只需要替换一下war包,并设置工作目录。)
迁移:安装好jdk、tomcat,(这里使用tomcat启动jenkins)
环境:
256 MB的RAM,尽管建议超过512MB
10 GB的驱动器空间(用于Jenkins和Docker镜像。我这里使用tomcat启动)
Java 8(无论是JRE还是Java Development Kit(JDK)都可以)
修改你的jenkins工作目录,三种方式
1、修改tomcat的catalina.sh。2、修改环境变量。3、修改jenkins的web.xml
本次使用第1种方式,使用你Web容器的管理工具设置JENKINS_HOME环境参数.
打开tomcat的bin目录,编辑catalina.sh文件。
在# OS specific support. $var _must_ be set to either true or false.上面添加:export JENKINS_HOME=""
在引号中填入你的路径。
(修改工作目录的方式参考:https://blog.csdn.net/russ44/article/details/51680463)
二、复制文档
复制jenkins的工作目录下所有内容(个人认为不需要迁移workspace中的内容,在新的机器上重新检出就好了)
JENKINS_HOME
+- config.xml (jenkins root configuration) 基本的配置信息,比如job的分类
+- *.xml (other site-wide configuration files) 系统设置中的信息
credentials.xml: jenkins上设置的各种 Credentials登录账号密码。
+-users 登录的用户账号密码
+- userContent (files in this directory will be served under your http://server/userContent/)
+- fingerprints (stores fingerprint records)
+- plugins (stores plugins) 安装的插件
+- jobs jenkins中每个job的配置。
+- [JOBNAME] (sub directory for each job)
+- config.xml (job configuration file)
+- workspace (working directory for the version control system)
+- latest (symbolic link to the last successful build)
+- builds
+- [BUILD_ID] (for each build)
+- build.xml (build result summary)
+- log (log file)
+- changelog.xml (change log)
这篇关于jenkins迁移,并由1.6版本升级到2.13的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!