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

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

问题描述

当前声明性管道将在到达第一阶段时自动执行 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天全站免登陆