1
votes

I am trying to publish 2 files 1.ext, 2.ext into a General purpouse v2 storage account that I've just created, I've created a file share inside of it.

Question: How to save/publish a file into storage account from Azure DevOps pipeline? Which task should I use? Azure copy seems to have only two types of storage avaiable: enter image description here

1

1 Answers

3
votes

Yes, you can use Azure file copy task.

enter image description here

Run the pipeline, the file will be uploaded to target storage account:

enter image description here

Anyway, you can also use Azure PowerShell or Azure CLI task to upload file to storage account. Here are the tutorial for PowerShell and CLI


Update

The Source could be a file or a folder path, so you can:

  1. Filter target files by PowerShell task in previous task, and copy it to a temporary folder.

  2. Upload the whole folder.

For example: I just uploaded the whole project source files by setting the path to $(Build.SourcesDirectory)

enter image description here

And then, all the files were uploaded to storage account.