I'm using VSTS to deploy an Angular app to blob storage making use of the new static website feature. For this I'm using the Azure File Copy
task.
Since Angular will create new filenames for the different bundles on every build I can't just overwrite the old files, so eventually there will be a lot of old & unsused files in that $web
container.
Unfortunately I haven't found a suitable task to do that.
How can I delete or clear out this container in VSTS using the release pipeline before redeploying?
Azure File Copy is internally using AzCopy
so it's is not possible to delete/clean up the container using Azure File Copy
You can use Azure CLI
task to invoke the az cmdlets
to clean up your container before running the Azure File Copy
task
az storage blob delete-batch --account-name <storage_account_name> --source <container_name>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With