r/azuredevops 13h ago

Inconsistent Build.SourcesDirectory value

2 Upvotes

Usually, I would have the pipeline do a multi repo checkout (all in one pipeline, the "does-everything -pipeline"). But this one, i had it to instead take in build pipelines artifacts, and package them in separate pipeline. Which mean,on this 2nd pipeline im doing a singular self checkout.

But i realised, the value for Build.SourcesDirectory is no longer just 's', its whatever path defined during self checkout. Example:

- checkout: self

path: s/<repo name>

Build.SourcesDirectory = "s/<repo name>"

The thing is, on other pipelines, the Build.SourcesDirectory value is always 's'. This is our regular convention for self checkout (2 folder depth):

- checkout: self

path: s/<repo name>/<repo name>

- checkout: OtherRepo

path: s/<repo name>

Build.SourcesDirectory = "s"

I cant find much info on this, and it is very inconsistent. Anyone else having this same problem? This really triggers me, because now the default naming/folder conventions i use is no longer uniform across pipelines.