问题描述
看起来 GitHubPullRequestBuilder 与 Jenkins v2.0 管道作业不兼容.
It looks like the GitHubPullRequestBuilder is not compatible with Jenkins v2.0 pipeline jobs.
如何配置管道作业以从 GitHub 拉取请求事件触发?
关于这个主题的文档很少,我找不到任何例子.还是在 GitHub 中创建一个 web-hook 来触发 PR 事件上的管道作业更好?
How do you configure a pipeline job to be triggered from a GitHub pull request event?
The documentation on this topic is sparse and I cannot find any examples of this. Or is it better to create a web-hook in GitHub to trigger the pipeline job on the PR event?
推荐答案
将 Pipeline 与 GitHub 拉取请求一起使用最直接的方法是将脚本放入名为 Jenkinsfile
的存储库中,然后安装GitHub 分支源 插件.文档
The most straightforward way to use Pipeline with GitHub pull requests is to put the script into your repository under the name Jenkinsfile
and then install the GitHub Branch Source plugin. Documentation
这篇关于如何从 GitHub 拉取请求触发 Jenkins 2.0 流水线作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!