简体   繁体   中英

Azure DevOps uzip as a deploy task

does anyone know how to uznip a file as a part of the deployment pipeline?

At the moment deploy finishes with a zip archive inside of fronted/download/myfiles.zip.

I want to add a task which will take this zip file and extract it into eg frontend/download/archive/...

Thank you

There is an Extract Archive task provided by Microsoft that you can use to extract archived files.

After you added it as a task that runs on your deployment group to you can configure it so that it does what you need. Make sure to set Archive file patterns and Destination folder correctly.

添加提取文件任务 配置任务以从中提取以及您想要提取的位置

Microsoft has provided a documentation for this, but i would like to share some info related to yaml snippet

steps:
 - task: ExtractFiles@1
  inputs:
    archiveFilePatterns: 'QtBinaries.rar'
    destinationFolder: '$(Build.SourcesDirectory)\bin'
    cleanDestinationFolder: false
- task: ExtractFiles@1
  inputs:
    archiveFilePatterns: 'AzureNeededDlls.rar'
    destinationFolder: '$(Build.SourcesDirectory)\bin'
    cleanDestinationFolder: false

Here i am trying to extract the two rar files with names('QtBinaries.rar, AzureNeededDlls.rar'), we can do it as one task also it depends on need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM