车4975 发表于 2016-4-19 10:38:28

ubuntu上搭建jenkins

必须的依赖环境
1.jdk
  java -version
  java version "1.6.0_20"
  OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.10.1)
  OpenJDK Server VM (build 19.0-b09, mixed mode)
  
2.maven
mvn -version
  Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800)
  Maven home: /opt/maven
  Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
  Java home: /usr/lib/jvm/java-6-openjdk/jre
  Default locale: en_US, platform encoding: UTF-8
  OS name: "linux", version: "2.6.35-22-generic-pae", arch: "i386", family: "unix"
  
3.git
git --version
git version 1.7.1
 
1.下载war包
http://mirrors.jenkins-ci.org/war/latest/jenkins.war
 
2.安装war包到tomcat
 
3.访问管理界面http://127.0.0.1:8888/jenkins/ 
port:8888,project:jenkins 都可以改变
 
4.管理jenkins插件
Jenkins GIT plugin
Maven Integration plugin
Javadoc Plugin
Email-ext plugin
 
Email-ext plugin 插件安装
1.git clone https://github.com/jenkinsci/email-ext-plugin.git
2.cd email-ext-plugin
3.mvn clean install
 
5.系统配置
1.jdk
2.maven
3.git
4.git plugin
5.email
 
6.新建jog
 
7.构建&远程部署& 邮件通知
 
8.大致的流程是这样的:
开发>本地测试>git提交代码>登录jenkins>从git拉代码构建>构建后发布到tomcat>邮件通知构建部署的结果
》if deploy error 》repeat
》if deploy success 》 test function 》 if success 》deploy production env 》else check env importance with dev
 
页: [1]
查看完整版本: ubuntu上搭建jenkins