动漫引擎

导航

WebApp的自动测试工具: Jenkins

 

一、下载并安装(msi)
https://jenkins.io/download/thank-you-downloading-windows-installer-stable/

在安装过程这, 需要从password文件(通常在C:\Jenkins\secrets\initialAdminPassword)中copy-paste初始安装用的password,类似如下

d0b4e7e1adc144d5b7fda3d53b8ecf2b,

这是admin的password

 

完成MSI安装之后,先初始化:(初始化只需要一次)

java -jar jenkins.war

 

以后,jenkins服务器的start/stop/restart可以通过下面的命令(必须在安装目录下执行)

>jenkins.exe start
>jenkins.exe stop
>jenkins.exe restart

 

二、安装下面的插件

在启动之后,除了安装缺省的插件之外,再增加下面的插件:

Build Blocker Plugin: 用于引用其它task

 

三、用new item 建立一个任务

从0开始写, 或者 copy已有的task

* 定时执行

* 多个任务共用1个子任务(例如:从git获取代码)

* 用参数化,支持多branch, 多brand,多site的build

 

四、注意

* 在window上用 execute windows  batch command;

  在linux上用 execute shell

* git 获取代码,需要支持submodule, 并且给予更多的timeout时间

   ** Additional Behaviours

 

     *** Recursively update submodules

     *** Timeout (in minutes) for submodules operations

 

posted on 2017-09-23 03:00  动漫引擎  阅读(220)  评论(0编辑  收藏  举报