在自由式作业中,在构建触发器"阶段有一个名为用于GITScm轮询的GitHub钩触发器"的选项.
In freestyle job there is an option named "GitHub hook trigger for GITScm polling" on stage Build Trigger.
此处的屏幕截图:
.
与gitlab配置中的webhook一起使用" myjenkins/gitlab/notify_commit "可以正常工作,这意味着当将某些内容推送到存储库时,构建将自动触发. 但是,为什么在Multibranch Pipeline中只有一个名为如果不运行则定期运行"的选项?是否有未安装的插件?如何像自由式作业一样使用github webhook触发Multibranch Pipeline构建
Together with webhook in gitlab config "myjenkins/gitlab/notify_commit" it works fine, meaning that the build will be triggered automatically when something is pushed to the repository. But why in Multibranch Pipeline there is only one option named "Periodically if not otherwise run"? Is there some plug-in not installed? How to trigger Multibranch Pipeline build with github webhook like freestyle job
推荐答案此页面介绍了如何在jenkins中的多分支工作流上配置按代码进行管道处理.
This page described how to configure pipeline-as-code on multibranch workflow in jenkins.
这是里面的描述的引文:
This is the quote from the description inside:
工作流多分支功能(由工作流插件提供)提供以下关键功能:
The Workflow Multibranch feature (provided by the workflow plugin) provides the following key abilities:
- Jenkins中每个新分支中的自动工作流(作业)创建 回购(假设从GH向Jenkins注册了Webhooks).
- 特定于该子分支的构建及其唯一的scm更改和构建历史.
- 根据设置自动修剪/删除从存储库中删除的分支.
- 如果需要,可以通过覆盖父属性来灵活地单独配置分支属性.
- Automatic Workflow (job) creation in Jenkins per new branch in the repo (assuming webhooks are registered from GH to Jenkins).
- Build specific to that child-branch and its unique scm change and build history.
- Automatic job pruning/deletion for branches deleted from the repository, according to the settings.
- Flexibility to individually configure branch properties, by overriding the parent properties, if required.
要配置Web钩子,请参考此页面.
To configure the webhooks, refer to this page.
要检查事件是否通知您的詹金斯人,可以在下面使用此功能:
To check if the events notify your jenkins you can use this feature below:
PS:监视您配置的URL目标,如果您错过url末尾的"/",则可能无法访问詹金斯人.
我希望这会有所帮助!
更多推荐
如何使用github webhook触发Multibranch Pipeline构建
发布评论