【问题标题】:Cannot extract artifact from azure devops无法从 azure devops 中提取工件
【发布时间】:2020-12-26 15:04:30
【问题描述】:

我在提取工件时遇到问题。 我有一个从管道下载工件的任务,一旦完成,它应该提取 zip 文件,但它会引发错误:错误:失败 rmRF:命令失败:rd /s /q "c:\Users\agent_002\xxx" 该进程无法访问该文件,因为它正被另一个进程使用。

我尝试检查是否将此文件复制到另一个位置,然后尝试解压缩它,但没有任何运气。 任何想法什么过程可以使用它以及如何解决这个问题?

我的代码:

 - 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'

任何想法我做错了什么?

【问题讨论】:

    标签: azure-devops yaml azure-pipelines artifact


    【解决方案1】:

    仅供日后参考。我做了一个解决方法并使用 powershell 脚本来提取文件。成功完成。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-09
      • 2019-05-12
      • 1970-01-01
      • 2019-09-25
      • 2021-07-17
      • 1970-01-01
      • 2021-01-15
      • 2022-11-24
      相关资源
      最近更新 更多