您的位置:首页 > 其它

Jenkins进阶系列之——03parameterized-trigger插件

2016-09-01 10:25 501 查看
说明:这个插件可以根据已经完成构建的结果,触发新Job或者传递参数。

官方说明:Parameterized Trigger Plugin

安装步骤:

系统管理→管理插件→可选插件→Build Triggers→Parameterized Trigger Plugin

安装完成后到项目(job)配置页面:

构建后操作[b]→Add post-build action→Trigger parameterized build on other projects[/b]





图1 插件配置示例界面
[b]Add trigger :添加触发[/b]

Projects to build:需要构建的项目(job)名,如果有多个项目用 , 分隔。

Trigger when build is:构建触发的条件

Stable 成功(稳定)(等价于successful)
Unstable 不稳定
Stable or unstable but not failed 成功(稳定)或者不稳定,但是没有失败
Unstable or Failed but not stable 不稳定或者失败,但是没有成功(稳定)
Failed 失败
Complete (always trigger) 完成(总是触发)

Trigger build without parameters:构建的job不带参数(选择后下面的参数无效)

没有特别的需求,参数可以忽略。

Add Parameters:添加参数

Boolean parameters 布尔参数(键值对)



图2 [b]Boolean parameters 界面[/b]

Build on the same node 在同一个节点上构建

(没有什么可以填写的,选择就可以了)



图3 [b]Build on the same node界面[/b]

Current build parameters 当前构建参数

(没有什么可以填写的,选择就可以了)



图4 [b]Current build parameters
界面[/b]

Parameters from properties file 从属性文件获取参数

相对于工作区的路径,用逗号分隔文件列表。文件类型:*.properties 。如果你不知道怎么写属性文件,建议你询问java开发人员。



图5 [b]Parameters from properties file界面[/b]

Predefined parameters 预定义参数

和properties文件的语法相同 。如果你不知道怎么写属性文件,建议你询问java开发人员。





图6 [b]Predefined parameters界面[/b]

[b]Restrict matrix execution to a subset 限制矩阵执行的一个子集[/b]

指定Groovy的过滤器表达式限制将运行的下游项目组合子集。



图7 [b]Restrict matrix execution to a subset 界面[/b]

Subversion revision svn版本





[b]图8 [b]Subversion revision 界面[/b][/b]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: