jenkins FAQ
1.Linux为Tomcat指定运行JDK
问题描述:
在搭建Jenkin集成时,由于系统环境配置了jdk1.7,但是jenkins在安装sonar的插件时,需要jdk1.8.,所以需要在Tomcat指定jdk1.8.
解决方案:
修改tomcat 的setclasspath.sh和catalina.sh,写入:
export JAVA_HOME=/home/manager/java/jdk1.8.0_121
export JRE_HOME=/home/manager/java/jdk1.8.0_121/jre/
备注:修改前stop tomcat
2. jenkins 控制台中文乱码问题
问题描述:
Your container doesn't use UTF-8 to decode URLs. If you use non-ASCII characters as a job name etc, this will cause problems. See Containers and Tomcat i18n for more details.
解决方案:
Jenkins建议在tomcat中使用utf-8编码,配置tomcat下conf目录的server.xml文件
增加 URIEncoding="UTF-8"
Ps:如果Job的控制台中文输出乱码,请将URIEncoding=”utf-8”更改为useBodyEncodingForURI="true"