zoukankan      html  css  js  c++  java
  • Jenkins自动构建

    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
     
  • 相关阅读:
    234. Palindrome Linked List
    Remove duplicates
    Unsorted, maximum ==> sorted
    Find one unique integer
    TwoSum
    13. Roman to Integer
    38. Count and Say
    543. Diameter of Binary Tree
    LuoguP1131 [ZJOI2007]时态同步 (树形DP,贪心)
    Luogu3177 [HAOI2015]树上染色 (树形DP)
  • 原文地址:https://www.cnblogs.com/youxin/p/5250032.html
Copyright © 2011-2022 走看看