Peter
Peter

Reputation: 87

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 e.g. frontend/download/archive/...

Thank you

Upvotes: 1

Views: 225

Answers (2)

Sajjad Ali Khan
Sajjad Ali Khan

Reputation: 1813

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.

Upvotes: 0

Felix B.
Felix B.

Reputation: 174

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.

Add Extract Files task Configure task to extract from and where you want to

Upvotes: 3

Related Questions