Reputation: 12333
When creating a new release definition in VSTS using the Azure Website Deployment template you get two tasks added automatically.
One of those tasks is the "Deploy Website to Azure". In that task there is a setting called "Additional Arguments". What is this setting for? And what does the defaults do?
-connectionString @{"$(ConnectionStringName)"="Server=tcp:$(ServerName).database.windows.net,1433;Database=$(DatabaseName);User ID=$(AdministratorLogin)@$(ServerName);Password=$(AdministratorLoginPassword);Trusted_Connection=False;Encrypt=True;"}
I have checked the docs at https://www.visualstudio.com/docs/overview but I can't find a single paragraph where someone talks about this feature. Google hasn't been of any help either unfortunately. I would appreciate it if someone could explain.
Upvotes: 3
Views: 1588
Reputation: 29976
The Azure Web App Deployment task uses Publish-AzureWebsiteProject command to publish the web deployment package just as starain mentioned. With this command, you can specify the "-ConnectionString" argument to configure the connection strings in the deployment. The setting in the task is used to do this.
As soon as you create a release definition with "Azure Website Deployment", you will see this setting, and you will also see the related variables created if you select "Configure variables...":
You can then update the connection strings by update the value of these variables.
Upvotes: 1
Reputation: 1113
You may want to consider utilizing the Deploy Azure RM Web App task instead as it provides more capabilities and leverages the Azure Resource Manager (ARM) APIs instead of the legacy Azure Service Management infrastructure. Both use Web Deploy for actual deployment of the application. Please note that to use the ARM-based tasks, you need to configure a Azure Resource Manager Service endpoint (link is in the documentation referenced)
Upvotes: 0
Reputation: 33728
Based on this article: https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/AzureWebPowerShellDeployment/Publish-AzureWebDeployment.ps1, it uses Publish-AzureWebsiteProject command. https://msdn.microsoft.com/en-us/library/dn722468.aspx
The Additional Arguments is used for extra arguments that not included, for example, the -connectionstring argument, which is to use for the deployment.
Upvotes: 0