what pipeline variable is this path?
i'm hunting for the environment variable for this value
i've tried $(Build.SourcesDirectory)
and $(Agent.BuildDirectory)
these all come up in C drive, is there a source of output for all the pipeline environment variables per run?
resources:
repositories:
- repository: self
type: git
ref: refs/heads/master
...
steps:
- checkout: self
...
- task: PowerShell@2
displayName: Display Build Dir
inputs:
targetType: 'inline'
script: 'Write-Host "Build Directory Location: `"$(Agent.BuildDirectory)`""'
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
solution: '$(BuildParameters.solution)'
selectOrConfig: config
nugetConfigPath: '$(Agent.BuildDirectory)/src/tree0/nuget.config'
idk why but using NugetCommand@2
with 'restore'
command on this windows agent uses back slashes \
. There was no error informing me of this. I changed the slashes and it started working.
despite the docs stating elsewise, see: slash documentation pipeline and seeing no contrary info in the task documentation: path variable doc in NugetCommand@2 i was left to trial and error (not really, a coworker suggested it but I dismissed the advice after reading the docs, silly me)
the code WAS in C drive despite the output of the checkout task stating elsewise. How did I find this out. I ran a recursive directory output that showed all the files.