如何使用 Post Webhooks for Bitbucket 插件评论拉取请求来触发 jenkins 多分支作业
how to trigger a jenkins multibranch job using comment a pull request with Post Webhooks for Bitbucket plugin
我正在使用 Post Webhooks for Bitbucket 插件来触发拉取请求事件。
我启用了以下选项:
"Pull request created"
"Pull request re-scoped"
当我创建推送请求时,它可以找到。
我希望在使用 "run this again" 等指定信息评论拉取请求时触发作业 运行 时,我希望有一个新要求,我看到这些是选项:
"Pull request commented"
但我不知道如何使用它。
我搜索但没有找到任何有用的文档。
谁能帮忙给个link或例子?
我知道有两种解决方法。
解决方案 1
- 使用 Bitbucket Server 自带的 webhooks。我认为它是在 Bitbucket Server 5.4 中引入的。
- 在 Jenkins 中使用 Generic Webhook Trigger Plugin 来使用 webhook JSON。此插件记录了如何使用正则表达式创建过滤器以仅在某些特定条件下触发。
解决方案 2
- 在 Bitbucket 服务器中使用 Pull Request Notifier for Bitbucket Server 插件。触发詹金斯。
- 在 Jenkins 中创建一个普通的、不需要插件的参数化作业,并使用 Bitbucket Server 插件触发它。
我正在使用 Post Webhooks for Bitbucket 插件来触发拉取请求事件。 我启用了以下选项: "Pull request created" "Pull request re-scoped" 当我创建推送请求时,它可以找到。 我希望在使用 "run this again" 等指定信息评论拉取请求时触发作业 运行 时,我希望有一个新要求,我看到这些是选项: "Pull request commented" 但我不知道如何使用它。 我搜索但没有找到任何有用的文档。 谁能帮忙给个link或例子?
我知道有两种解决方法。
解决方案 1
- 使用 Bitbucket Server 自带的 webhooks。我认为它是在 Bitbucket Server 5.4 中引入的。
- 在 Jenkins 中使用 Generic Webhook Trigger Plugin 来使用 webhook JSON。此插件记录了如何使用正则表达式创建过滤器以仅在某些特定条件下触发。
解决方案 2
- 在 Bitbucket 服务器中使用 Pull Request Notifier for Bitbucket Server 插件。触发詹金斯。
- 在 Jenkins 中创建一个普通的、不需要插件的参数化作业,并使用 Bitbucket Server 插件触发它。