jenkins multibranch pipeline disable auto node checkout

时间秒杀一切 提交于 2021-02-06 16:17:40

问题


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)

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?


回答1:


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



来源:https://stackoverflow.com/questions/47585355/jenkins-multibranch-pipeline-disable-auto-node-checkout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!