We are using azuredevops server with AKS based agents with Keda support for scaled jobs. we have enabled persistent volume with AzureDisk to store the build caches (mvn, npm, etc..) which is working as expected.
But now the challenge we are facing is during the default gitcheckout task of azurepipeline for some repos its taking long time as the repository size is huge due to the images and some wrappers in he repo. This is making the azuredevops checkout task to hours and since we are using aks based build agents, for each job and each time this task is getting hours.
As further analyzed, we identified that the .git folder is consuming large space and which is delaying the git checkout.
So we are looking for a solution here, either by 1 of below
is it possible to checkout of corresponding branch of repo only possible as part of the default gitcheckout task without any git history or .git folder
Else is it possible to use the persistent volume to map the checkout workaspace of the ado repo. worried if 2 builds are executed parallelly from different branches and in that case will the build will be unique in that case ?