让VSTS代理使用相同的

让VSTS代理使用相同的

本文介绍了让VSTS代理使用相同的“工作目录",每次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行获取源"构建任务的VSTS本地代理,该任务导致GIT存储库被下载.效果很好.

I have a VSTS local agent that runs a "Get Sources" build task, which causes the GIT repository to be downloaded. This works fine.

不幸的是,我的GIT存储库大小超过20个演出.我将获取源代码"任务设置为不进行任何清理,因为我想防止后续的GIT下载不必每次都下载整个20 gig存储库.

Unfortunately, my GIT repository is over 20 gigs in size. I have the "Get Sources" task set to not do any cleanup, because I want to prevent subsequent GIT downloads to not have to download the entire 20 gig repository every time.

今天,我注意到代理已将工作目录从

Today, I noticed that the agent switched the working directory from

这导致在执行获取源代码"构建任务时再次重新下载整个存储库.

which caused the entire repository to be re-downloaded again when the "Get Sources" build task executed.

构建代理决定工作目录"解析的方法是什么,有没有办法强制代理使用同一目录?

我真的没有时间每次需要进行部署都下载20个演出.

I really can't afford the time to download 20 gigs every time I need to do a deployment.

我在存储库中没有正在进行的标记或分支.除了尺寸之外,它还很简单.

I have no tagging or branching going on in the repository. It's fairly straight forward aside from the size.

提前谢谢!

推荐答案

每个构建定义都进入代理工作目录中的自己的目录.

Each build definition goes into its own directory within the agent's working directory.

这是有意的,不能更改,并且应该不能更改.它以这种方式运行的原因是为了支持并发构建功能-保证共享同一存储库副本的多个运行中的构建迟早会相互协作.

This is intentional, cannot be changed, and should not be changed. The reason it behaves this way is to support the ability to build concurrently -- multiple running builds sharing the same copy of the repository are guaranteed to step on each other sooner or later.

同步每个仓库的回购仅会发生一次.

Synchronizing the repo will only happen once per build definition per agent.

这篇关于让VSTS代理使用相同的“工作目录",每次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 17:59