码迷,mamicode.com
首页 > 其他好文 > 详细

Jenkins自动构建

时间:2016-03-07 13:29:10      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

Jenkins is an award-winning, cross-platform, continuous integration and continuous delivery application that increases your productivity. Use Jenkins to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. It also allows you to continuously deliver your software by providing powerful ways to define your build pipelines and integrating with a large number of testing and deployment technologies.

http://jenkins-ci.org/

Hudson是Jenkins的前身,是基于Java开发的一种持续集成工具。

 

Jenkins是基于Java开发的一种持续集成工具,用于监控持续重复的工作,功能包括:
1、持续的软件版本发布/测试项目。
2、监控外部调用执行的工作。
 
首先保证系统中已经安装了jdk,最好是jdk1.5以上。
第一种启动方法,切换到jenkins.war存放的目录,输入如下命令:
$ java -jar jenkins.war
然后在浏览器中(推荐用火狐)输入localhost:8080,localhost可以是本机的ip,也可以是计算机名。就可以打开jenkins
第二种方法是用tomcat打开
解压tomcat到某个目录,如/usr/local,进入tomcat下的/bin目录,启动tomcat.
将jenkins.war文件放入tomcat下的webapps目录下,启动jenkins时,会自动在webapps目录下建立jenkins目录,所以在地址栏上需要输入的地址于上一种方法有点不一样。
 

 系统设置

在已运行的Jenkins主页中,点击左侧的系统管理—>系统设置进入如下界面:

技术分享

 

 

使用
 
1.新建一个job
技术分享
2.
技术分享 
(丢弃旧的构建:http://www.blogjava.net/qileilove/archive/2014/02/08/409616.html
http://www.2cto.com/os/201502/377054.html
 
 
 
 
  • 配置svn
技术分享 
 
 
  • 配置构建触发条件
技术分享 
 
 
  • 配置构建触发执行动作,将执行生成报告脚本

自动运行Build

触发一个build:

  • Builds in Jenkins can be triggered periodically (on a schedule, specified in configuration) 这里定义schedule的语法是unix常见的cron语法。
  • Or when source changes in the project have been detected

可以设置Jenkins定时检查SVN是否发生了变化,也可以手动检查:http://YOURHOST/jenkins/job/PROJECTNAME/pollong。也可以设置Jenkins为post-commit,这个方式尤其适用于那些检查是否代码改变会花费很长时间的情况。

  • Or they can be automatically triggered by requesting the URL:

http://YOURHOST/jenkins/job/PROJECTNAME/build

 

技术分享 
 
  • 设置构建后操作
技术分享 
技术分享 
技术分享 
  • 构建效果
技术分享 

 

 
 
http://www.ibm.com/developerworks/cn/java/j-lo-jenkins/
http://blog.csdn.net/littlechang/article/details/8642149
http://blog.csdn.net/pingnanlee/article/details/18962207
 

Jenkins自动构建

标签:

原文地址:http://www.cnblogs.com/youxin/p/5250032.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!