热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

java触发jenkinsjob_Jenkins通过特定标签触发构建

从其中一个测试用例:场景:应在创建标记时触发构建,而不是在删除标记时触发构建.Giventhefollowinggenericvariab

从其中一个测试用例:

场景:应在创建标记时触发构建,而不是在删除标记时触发构建 .

Given the following generic variables are configured:

| variable | expression | expressionType | defaultValue | regexpFilter |

| object_kind | $.object_kind | JSONPath | | |

| before | $.before | JSONPath | | |

| after | $.after | JSONPath | | |

| ref | $.ref | JSONPath | | |

| git_ssh_url | $.repository.git_ssh_url | JSONPath | | |

Given filter is configured with text: $object_kind $before $after

Given filter is configured with expression: ^tag_push\s0{40}\s.{40}$

Given received post content is:

"""

{

"object_kind": "tag_push",

"before": "0000000000000000000000000000000000000000",

"after": "82b3d5ae55f7080f1e6022629cdb57bfae7cccc7",

"ref": "refs/tags/v1.0.0",

"repository":{

"git_ssh_url":"git@example.com:jsmith/example.git",

}

}

"""

Then the job is triggered

Then variables are resolved to:

| variable | value |

| object_kind | tag_push |

| before | 0000000000000000000000000000000000000000 |

| after | 82b3d5ae55f7080f1e6022629cdb57bfae7cccc7 |

| ref | refs/tags/v1.0.0 |

| git_ssh_url | git@example.com:jsmith/example.git |



推荐阅读
author-avatar
潇洒看不惯_185
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有