

Note that the $(Build.ArtifactStagingDirectory) and $(Common.TestResultsDirectory) are always deleted and recreated prior to every build regardless of any of these settings. Sources and output directory: Same operation as Sources option above, plus: Deletes and recreates $(Build.BinariesDirectory). More specifically, the following Git commands are executed prior to fetching the source. Sources: The build pipeline performs an undo of any changes in $(Build.SourcesDirectory). YAML Pipelines are supported in Azure DevOps Server 2019 and higher. parameters:īy default, clean is set to true but can be overridden when manually running the pipeline by unchecking the Checkout clean checkbox that is added for the runtime parameter. In the following example, a runtime parameter is used to configure the checkout clean setting. To override clean settings when manually running a pipeline, you can use runtime parameters. Select YAML, Get sources, and configure your desired Clean setting. To configure the Clean setting:Įdit your pipeline, choose.

In this case, to get the best performance, make sure you're also building incrementally by disabling any Clean option of the task or tool you're using to build. In general, for faster performance of your self-hosted agents, don't clean the repo. You can perform different forms of cleaning the working directory of your self-hosted agent before a build runs. Usually you'll set this to be the same as the default branch of the repository (for example, "master"). The default branch has no bearing when the build is triggered through continuous integration (CI). If you set a scheduled trigger for the build, this is the branch from which your build will get the latest sources. This is the branch that you want to be the default when you manually queue this build. All in all, submodules are awesome, but for only a very particular use case.Click Advanced settings in the Get Sources task to see some of the above options.

There are also the potential security and stability issues this could cause, if you do not manage the repo being included.
#Download git submodules update#
Same goes for updates- submodules will not be fetched with a git pull, so git submodule update needs to be run.
#Download git submodules download#
Git doesn't automatically download submodules after clone (unless you use the -recursive flag), so if this is required for the project to run, you'll need to either document this, or add something into your build script to grab the submodules. Usually a dependency management system (such as Cargo, NPM, RubyGems, Go Modules etc.) is a better solution. It's worth nothing, that this may work well for simple use cases, but would not be practical at all for referencing multiple packages.
