如何使用管道脚本将特定文件夹从git克隆到Jenkins工作空间?

问题描述 投票:0回答:1

我只想使用管道脚本从git repo到Jenkins工作区克隆一个特定的文件夹?有可能吗?

 stage('SCM Scripts Checkout') {
            steps {
              git branch: 'live-state-container'
              url: '[email protected]:managed/12323/232345.git'
            }
git jenkins jenkins-pipeline devops
1个回答
0
投票

[我认为您将“结帐”一词与“克隆”相混淆。 Jenkins克隆整个存储库,而不是让它们持久保存在文件系统上,并在需要时提取更改。

您不能clone Git存储库的一部分。您可以使用git clone --bare命令克隆裸仓库,也可以选择不使用git clone --no-checkout检出HEAD,这都是很有趣的选项。

© www.soinside.com 2019 - 2024. All rights reserved.