简体   繁体   English

从另一个作业触发Jenkins多分支管道扫描

[英]Trigger Jenkins Multibranch Pipeline Scan from another job

Is it possible to trigger Scan Multibranch Pipeline Now action for a Jenkins Multibranch Pipeline from another Job? 是否可以从另一个作业触发Jenkins多分支管道的“立即扫描多分支管道”操作? I have certain issues integrating my old version of Gitlab with Pipeline Jobs in Jenkins and came upon such a workaround. 我在Jenkins中将旧版本的Gitlab与Pipeline Jobs集成时遇到某些问题,并且遇到了这样的解决方法。

Alternatively, would it be possible to trigger Scan Multibranch Pipeline Now with a notifyCommit web hook? 或者,是否可以通过notifyCommit Web挂钩触发立即扫描多分支管道?

The purpose of this would be to Scan Multibranch Pipeline whenever a change occurs in the Git repo, so that new branches are detected after such a change. 这样做的目的是在Git存储库中发生更改时扫描多分支管道,以便在更改后检测到新分支。 Another purpose, which I am unable to achieve otherwise (except for periodic polling per branch which is plain evil to me), is to trigger build of branches affected by given changeset. 我无法实现的另一个目的(除了对每个分支进行定期轮询(这对我来说是很邪恶的)),是触发受给定变更集影响的分支的建立。 I use old GitLab (7.8) which does not work with the ordinary Gitlab plugin and the Gitlab Hook plugin does not work with pipeline jobs , so my workaround would be to have an non-Pipeline Job to be triggered by Gitlab Hook plugin and this job would in turn trigger Scan Multibranch Pipeline. 我使用的旧GitLab(7.8)无法与普通的Gitlab插件一起使用 ,而Gitlab Hook插件不适用于管道作业 ,因此我的解决方法是让Gitlab Hook插件和该作业触发非管道作业反过来会触发“扫描多分支管道”。

原来,简单的notifyCommit Web钩子完成了这项工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM