第一部分:常规设置(general)
1.点击新建,进入新建项目页面

2.输入项目名称,选择构建一个自由风格的软件项目(里面可以自己自由进行配置,使用更加灵活),点击ok

3.项目名称与描述

4.github project :里面配置响应的url和需要显示的名称就可以了

5.throttle builds:节流构建,通过设置时间段内允许并发的次数来实现构建的控制

6.丢弃旧的构建:设置构建历史的保存策略

7.参数化构建过程:里面可以配置不同的参数,便于在构建时引用这些参数

8.关闭构建:这样项目就没法进行构建了
在必要时进行并发构建:满足策略要求时就会进行并发构建
安静期:设置一个时间来间隔每次构建的间隔
重试次数:这个和系统设置的一样,拉取源码重试的次数
该项目的上游项目正在构建时阻止该项目构建与该项目的下游项目正在构建时阻止该项目构建:用于上下游项目有关联的构建策略
使用自定义的工作空间:使该项目独立于系统的工作空间
保留构建的依赖日志

第二部分:源码管理
以svn为例
repository url:填写仓库的地址
Credentials:这里需要配置拉取svn源码的用户名和密码
Local module directory:具体的项目的路径,默认从根目录拉取
Additional Credentials:增加额外认证
Check-out Strategy:代码检出策略
源码库浏览器:这里默认就可以了

第三部分:构建触发器
1.触发远程构建 (例如,使用脚本):这里使用于自动化构建,拼接url后写入代码中可以实现在脚本或者工具执行构建

2.Build after other projects are built:构建与其他项目构建后,用于上下游项目有关联的时候

3.Build periodically:定时执行构建
日程表的参数
第一个参数代表的是分钟 minute,取值 0~59;
第二个参数代表的是小时 hour,取值 0~23;
第三个参数代表的是天 day,取值 1~31;
第四个参数代表的是月 month,取值 1~12;
最后一个参数代表的是星期 week,取值 0~7,0 和 7 都是表示星期天。

4.Build when a change is pushed to GitHub:这个是github项目的触发规则

5.Poll SCM:设置定时检查代码仓库是否有变更,有变更则构建

第四部分:构建环境
Delete workspace before build starts:在构建之前清空工作空间
Abort the build if it's stuck:如果构建出现问题则终止构建
Add timestamps to the Console Output:给控制台输出增加时间戳
Use secret text(s) or file(s):使用加密文件或者文本

第五部分:构建
1.execute windows batch command:执行windows的cmd

2.execute shell:执行shell命令

3.invoke ant:调用ant ,调用ant的执行脚本来进行构建

4.invoke gradle script :调用grade脚本,来帮助我们自动打包

5.invoke top-level maven targets:调用maven

第六部分:构建后操作
简单介绍下常用的几个选项
build other projects:构建其他项目
e-mail notification:发送邮件
editable email notification:发送邮件(这是一个插件,以后会单独介绍这个插件)
delete workspace when build is done:构建后删除工作空间

网友评论