We are trying to set up a CI pipeline for building several Docker containers and deploying them to a container registry using Azure DevOps. Our code, the Docker and configuration files all reside in a Azure git repository and building those containers just works fine.

However, we have to build one container around a tomcat app that we only have as a .war file that is approx. 20Mb in size. We do not want to commit this file to our repository (we are not convinced that using git LFS would solve the problem because of experiences in other projects), but instead keep it on an azure storage account (either blob or file share storage).

My problems start when I want to include a task to download this file into the build environment as a task in the build pipeline. Getting a file that is openly accessible is easy with either a powershell or bash script. However, in order to download from the storage account you first need to authenticate and I can not find a good way to achieve this.

1 Answer 1


Steps for download are described here: How To Download Azure BLOB Storage Using Azure PowerShell. According to this article, you have to use the connection string from the Access keys page. You can create your custom secret variable (Variables) and save a connection string in your new variable. Then in your ps scripts you can reference to connection string (stored in variable) with "$env:VARIABLE_NAME".

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.