CenOs下Jenkins搭建

1.上传安装包 jenkins-1.656-1.1.noarch.rpm

2.安装jenkins

sudo rpm -ivh jenkins-1.656-1.1.noarch.rpm

3.vi /etc/sysconfig/jenkins

修改端口JENKINS_PORT="8888"  —端口随意

修改运行用户JENKINS_USER="admin"

4.vi /etc/init.d/jenkins

添加java路径~/software/jdk1.7.0_79/bin/java

 

candidates="

/etc/alternatives/java

/usr/lib/jvm/java-1.6.0/bin/java

/usr/lib/jvm/jre-1.6.0/bin/java

/usr/lib/jvm/java-1.7.0/bin/java

/usr/lib/jvm/jre-1.7.0/bin/java

/usr/lib/jvm/java-1.8.0/bin/java

/usr/lib/jvm/jre-1.8.0/bin/java

/usr/bin/java

/home/admin/software/jdk1.7.0_79/bin/java

5.修改jenkins所有者

 

sudo chown -R admin /usr/lib/jenkins  

sudo chgrp -R admin /usr/lib/jenkins 

 

sudo chown -R admin /var/log/jenkins 

sudo chgrp -R admin /var/log/jenkins  

sudo chown -R admin /var/lib/jenkins  

sudo chgrp -R admin /var/lib/jenkins  

sudo chown -R admin /var/cache/jenkins 

sudo chgrp -R admin /var/cache/jenkins

 

6.启动jenkins

sudo service jenkins start

 

7.访问jenkins

http://ip:8888

 

8.安装jenkins后“可选插件”列表中显示为空

http://www.techv5.com/topic/421/


需要安装软件:

Grails

JDK

GIT

TOMCAT

PYTHON,NOSE

 

需要安装插件:

Cobertura Plugin 代码覆盖率

Email Extension Plugin 邮件通知

Grails plugin 编译工具

JUnit Plugin 单元测试

Python Plugin  pyhton脚本

SSH Slaves plugin 远程登录节点服务器

Hudson Seleniumhq plugin

TestNG Results Plugin

 

Job:

按前后顺序执行

 

build  构建

test   测试(单元,接口,ui

checkcode 代码检查

deploy 部署

 

触发条件:

构建 一旦代码有变动

测试  按实际需要

代码检查 一旦代码有变动

部署 按实际需要