2

I have a problem with extracting artifacts. I have a task to download artifact from pipeline, once done it should extract zip file but it's throwing an error : Error: Failed rmRF: Command failed: rd /s /q "c:\Users\agent_002\xxx" The process cannot access the file because it is being used by another process.

I tried to check if I copy this file into another location and then try to unzip it but without any luck. Any ideas what process can use that and how to fix this ?

my code:

 - stage: download_and_extract
  jobs:
  - job: download_pipeline_artefact
    pool:
      name: default
      demands: agent.os -equals Windows_NT

    steps:
    - task: DownloadPipelineArtifact@2
      inputs:       
        patterns: '**/*.zip'
        path: $(Build.SourcesDirectory)/bin

    - task: CopyFiles@2
      inputs: 
        sourceFolder: $(Build.SourcesDirectory)/bin/
        targetFolder: $(Build.SourcesDirectory)

    - task: ExtractFiles@1
      inputs:
        archiveFilePatterns: '$(Build.SourcesDirectory)/xxx/xxx.zip'

Any ideas what I am doing wrong ?

1 Answer 1

0

Just for future reference. I did a workaround and used powershell script to extract the file. It completed successfully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.