How to keep agent's temp folder in order to invoke command from Azure DevOps release pipeline manually

Viewed 1962

I want to troubleshot a single step from Azure DevOps release pipeline (classic mode).

The step invokes similar command on deployment VM:

C:\azagent\A1\_work\_tool\VsTest\17.0.0\x64\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@_work\_temp\qrjwcoj0moy.tmp

However the temp folder C:\azagent\A1\_work\_temp\ is removed. Can I keep keep the temp files in order to invoke the command manually?

2 Answers

I have added a step that copies the directory depending on the variable 'system.debug':

- task: CopyFiles@2
  inputs:
    SourceFolder: '$(Agent.TempDirectory)'
    Contents: '**'
    TargetFolder: '$(Build.ArtifactStagingDirectory)\AgentTempDirectory'
  displayName: 'Copy Agent.TempDirectory to drop'
  condition: eq(variables['system.debug'], 'true')
Related