简体   繁体   English

Jenkins 多分支管道脚本

[英]Jenkins multibranch pipeline script

For reasons, my project requires a Jenkins multibranch pipeline (or similar) where the pipeline definition has to live externally to the SCM, either as a Jenkinsfile or pipeline script.出于某些原因,我的项目需要一个 Jenkins 多分支管道(或类似管道),其中管道定义必须存在于 SCM 外部,无论是作为 Jenkinsfile 还是管道脚本。 It just needs to be able to scan all branches and follow a predetermined set of steps.它只需要能够扫描所有分支并遵循一组预定的步骤。

Is this possible?这可能吗?

In multi-branch pipeline You should have different Jenkins files in each and every branch to execute the given steps in stages of pipeline.在多分支管道中,您应该在每个分支中都有不同的 Jenkins 文件,以在管道的各个阶段执行给定的步骤。 Within the multi-branch pipeline it automatically scan all the branches in your repository and find-out all separated jenkins files using Scan Repository Now option.在多分支管道中,它会自动扫描存储库中的所有分支,并使用Scan Repository Now选项找出所有分离的 jenkins 文件。 further under the Scan Repository Log , you will able to find out the log details of every branches..进一步在Scan Repository Log 下,您将能够找到每个分支的日志详细信息..

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

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