We have an Azure Cloud Service with a web role and a worker role. We would like to setup continuous delivery in Visual Studio Team Services, automatically pushing out a build to Azure on source check-in. (QA environment). The source code is in Github. It's a best practice to no check in secrets to Github, so we are only checking in the .csdef file, not the .cscfg file(s).
What is the best way to create a build definition in VSTS which will pick up the .cscfg file from some other location and create the Cloud Service package? Where to store the .cscfg file and how to configure the build?
Solution: ended up using custom PowerShell scripts to replace configuration values in
.cscfg
file with VSTS variables. The configuration PowerShell scripts runs per environment defined in the release management pipeline. Note: variables defined as secret, will have to be passed as parameters to the PowerShell script, as the PowerShell script will not have access to those parameters using$Env: