How to run a SQL script after deploying an azure package

I have a sql script which is invoked via a batch file which I want to parameterize based on the environment.
Essentially the batch file calls sqlcmd.exe
I want to run this script after my azure package has deployed.

The trouble is that if I add the batch file to my nuget package it seems that the Work folder gets deleted immediately after the Azure step has deployed, so that I have no way of running the batch file.

Can you advise on how to achieve this?

Hi Ian,

Thanks for getting in touch.

The way to achieve this is to include your batch file in your NuGet package, and write a PowerShell script to invoke your batch file. This document explains how to have the PowerShell executed at the Post-Deploy stage.

I hope this helps,