Skip to content

Commit

Permalink
Update pull request yaml to dump env vars in file
Browse files Browse the repository at this point in the history
  • Loading branch information
coenm committed May 31, 2024
1 parent 9bdebf0 commit 6414045
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .azuredevops/Pipelines/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ stages:
- script: dotnet --info
displayName: Show dotnet SDK info

- task: PowerShell@2
displayName: Export variables
inputs:
targetType: 'inline'
script: |
$var = (gci env:*).GetEnumerator() | Sort-Object Name
$out = ""
Foreach ($v in $var) {$out = $out + "`t{0,-28} = {1,-28}`n" -f $v.Name, $v.Value}
$fileName = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY "EnvironmentVariables.md")
write-output "Dump variables on $fileName"
set-content $fileName $out
write-output "##vso[task.addattachment type=Distributedtask.Core.Summary;name=Environment Variables;]$fileName"
errorActionPreference: 'silentlyContinue'
ignoreLASTEXITCODE: true

- task: NuGetToolInstaller@1
displayName: Install Nuget 5x
inputs:
Expand Down

0 comments on commit 6414045

Please sign in to comment.