在Azure DevOps CI管道中,没有下载几个Azure DevOps Repo的文件夹
我在Azure DevOps中创建了CI管道。我的存储库是Azure DevOps Repo。
我的回购尺寸很大,因此我不希望在Agent Machine上下载一些文件夹,因为这些文件夹是多余的,用于构建代码。
我需要在管道yaml文件中进行哪些更改?
例如,不应下载folderx
I have Created a CI Pipeline in Azure Devops. My Repo is Azure DevOps Repo.
My Repo size is big so i do NOT want some of Folders to be downloaded on agent machine as Those folders are redundant for code build.
What changes i need to do in my pipeline yaml file?
for example FolderX should not be downloaded
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在克隆过程中,您不能具体地排除文件夹。目前,Azure DevOps不支持Git Blob过滤器。
You cannot specific exclude folders during cloning. At present time, Azure DevOps does not support Git blob filters.
即使您添加.gitignore,它也会克隆整个存储库内容。
您可以通过命令行任务自定义结帐步骤,其中“ git sparse-checkout ”。
如下:
您可以找到类似的链接在这里和在这里。
It will clone the whole repository content even you add .gitignore.
You could customize the checkout step via Command line task with "git sparse-checkout".
Sample as below:
You can find similar link here and here.