I have PowerShell scripts to deploy csv files into Azure tables storage.Now,I want to configure these scripts in VSTS at the release definition after the WebApp deployment is done.So once the web app deploy is done,I will execute these scripts using VSTS PowerShell task.So I have 6 environments ,My PowerShell script will have to be deployed into different azure storage accounts(Environments).So I need to pass the storage account name,storage account key,resource group separately for different environments but my PowerShell script will be the same.So I can pass these arguments using argument field of PowerShell task in VSTS.But I don't want to pass using that field option.So,Is there any best way to pass those arguments at the release definition of VSTS. Please help me on this.
1 Answer
The simple way is using environment variable:
- Add variables with the same name (different value) for each environment, such as storageAccountName
- Using environment variables in PowerShell task, Arguments
- storageAccountName $(storageAccountName)
3 Comments
PRAVEEN PDBR
Thanks MSFT.But I am facing error.Please find the complete log @ 1drv.ms/t/s!AvMxvVJdKJlVhxbPduUZhfBRLaa6 ...Please help me on this.
PRAVEEN PDBR
@MSFT,Now my script is running without any issues.Thanks a lot for your continued support.Really appreciating your help.
PRAVEEN PDBR
@MSFT, Could you please help me on webjobs issue.I have opened new thread @ stackoverflow.com/questions/47674749/… ..Please help me on this..
