Jun 24 2021
When we are building a new Pipeline into Azure DevOps, we don't have any visibility on the server itself and his content placed into work folder.
In many situation, like debugging, that vision is really useful to find a file or a path to apply into another task (like Code Coverage report path).
To do that, the simplest option is to place into the pipeline flow one PowerShell step with this simple execution.
In Yaml mode:
- powershell: |
Write-Host "Show all folder content"
Get-ChildItem -Path $(Agent.WorkFolder)\*.* -Recurse -Force
displayName: 'PowerShell Script List folder structure'
In visual editor mode:
At the next execution, you will have into the Pipeline execution log all folders and files placed into the agent workplace like:
You can use the search button or View raw log option to look the file or folder you are looking for.
That task could be disable in standard usage, and enable only when you need to debug.