Ideally, I would want to configure our Azure Web App application settings using build variables (on VSTS), for example:
We perform our publish tasks using Powershell scripts. In order to set app settings, the following script could be used:
param($websiteName, $appSettings)
Set-AzureWebsite -Name $websiteName -AppSettings $appSettings
I could pass these build variables manually into a Powershell script build task, like so:
PrepareAppSettings.ps1 -websiteName "MyWebApp" -appsettings @{"MyConnectionString" = $(MyConnectionString);"MyRandomService" = $(MyRandomService);"MyRandomServiceClient"=$(MyRandomServiceClient);"MyRandomServicePassword"=$(MyRandomServicePassword)}
Is there a way to pass all build variables into a script without having to explicitly specifying each one in a hash table?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…