詹金斯多分支管道禁用自动节点检出 [英] jenkins multibranch pipeline disable auto node checkout

查看:55
本文介绍了詹金斯多分支管道禁用自动节点检出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前声明性管道在进入第一阶段时将自动执行checkout scm.
我想要的是仅在子目录内签出scm. (因此它不会在根目录中签出相同的内容)

Currently declarative pipeline will do checkout scm automatically when hitting first stage.
What I want is to checkout scm within subdirectory only. (so it won't checkout same thing in root directory)

由于它需要jenkinsfile,因此已经结帐一次.加上目录子目录,我总共结帐三次... 是否可以使用声明性语法在多分支管道中禁用自动检出?

Since it needs jenkinsfile it already checkout once. Plus directory & subdirectory I checkout thrice total... Is it possible to disable auto checkout in multibranch pipeline using declarative syntax?

推荐答案

如果使用声明性管道,则添加选项{skipDefaultCheckout()}

Add options { skipDefaultCheckout() } if you use Declarative pipeline

这篇关于詹金斯多分支管道禁用自动节点检出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆