Azure DevOps - How to monitor the files & folders placed into the Build Pipeline Workfolder

Steel Contributor

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
  errorActionPreference: continue
  displayName: 'PowerShell Script List folder structure'
  continueOnError: true

In visual editor mode:

image_2021-06-24_184555.png

At the next execution, you will have into the Pipeline execution log all folders and files placed into the agent workplace like:

image_2021-06-24_184757.png

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.

 

Fabrice Romelard

0 Replies