【发布时间】:2019-05-14 20:39:47
【问题描述】:
多分支管道插件虽然很棒,但不会开箱即用地构建标签。需要使用 basic-branch-build-strategies-plugin 来启用标签发现和构建。
我的问题直接与:Is there a way to automatically build tags using the Multibranch Pipeline Jenkins plugin?
此插件在 UI 中运行良好,但似乎无法使用 Jenkins 作业 dsl 轻松配置。有没有人有任何关于如何使用 dsl(或 dsl configure->)设置分支策略以便发现和构建标签的示例?
在通过 ui 更改设置时检查了 config.xml 文件之间的增量,看来我需要能够添加此 trait:
<org.jenkinsci.plugins.github__branch__source.TagDiscoveryTrait />
以及构建策略下的本节:
<buildStrategies
<jenkins.branch.buildstrategies.basic.TagBuildStrategyImpl
plugin="basic-branch-build-strategies@1.1.1">
<atLeastMillis>-1</atLeastMillis>
<atMostMillis>172800000</atMostMillis>
</jenkins.branch.buildstrategies.basic.TagBuildStrategyImpl>
</buildStrategies>
【问题讨论】:
标签: jenkins github branch multibranch-pipeline