0

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 1

0

The simple way is using environment variable:

  1. Add variables with the same name (different value) for each environment, such as storageAccountName

enter image description here

  1. Using environment variables in PowerShell task, Arguments - storageAccountName $(storageAccountName)
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks MSFT.But I am facing error.Please find the complete log @ 1drv.ms/t/s!AvMxvVJdKJlVhxbPduUZhfBRLaa6 ...Please help me on this.
@MSFT,Now my script is running without any issues.Thanks a lot for your continued support.Really appreciating your help.
@MSFT, Could you please help me on webjobs issue.I have opened new thread @ stackoverflow.com/questions/47674749/… ..Please help me on this..

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.