Skip to main content

Configure Tasks

Configure the following tasks for Database release.

Create Azure SQL​

  1. Select Create Azure SQL and choose a subscription.
  2. Select the script path for the WebApp as shown in the image and select Ok.
  3. Add the script argument in the Script Argument Section. You can edit the script as required. -resourceGroupName "$(_ResourceGroupName)" -Location "$(_Location)" -DBType "$(type)" -SQLServerName "$(SQLServerName)" -SQLUserName "$(SQLUserName)" -SQLPassword $(ConvertTo-SecureString "$(SQLPassword)" -AsPlainText -Force) -DatabaseName "$(DatabaseName)" -DatabaseSKU "$(DatabaseSKU)"
  4. Select the Latest installed version under Azure PowerShell Version.

Image Alt

Image Alt

Azure SQL Dacpac File​

  1. Under SQL Database, add Authentication Type, Azure SQL Server, Database, Login, Password.
  2. Under Deployment package, Deploy type and Action.
  3. Under Firewall, choose AutoDetect and select Delete Rule After Task Ends.
  4. Under Control Options, add the following custom condition. and(succeeded(), eq(variables['type'], 'SQLAzure'), eq(variables['BackupSchema'], 'true'))

Upload Dacpac To Storage​

  1. Select Upload Dacpac To Storage.
  2. In the script path text field, add the script path.
  3. Add the following script argument. -File "$(dacpac.SqlDeploymentOutputFile)" -StorageAccountName "$(StorageAccountName)" -StorageAccountkey "$(StorageAccountkey)" -StorageContainerName "$(DBStorageContainerName)"
  4. Select Enabled under Control Options and add the custom condition. and(succeeded(), eq(variables['type'], 'SQLAzure'), eq(variables['BackupSchema'], 'true'))

Image Alt

Azure SQL Bacpac File​

  1. Select Azure SQL Bacpac File.
  2. Select File format (JSON) and add **/appsettings.json in Target files text area.
  3. Select Enabled under Control Options and add the custom condition. and(succeeded(), eq(variables['RestoreBuild'], 'false'))

Deploy Azure App Service Linux​

  1. Select Deploy Azure App Service Linux.
  2. Choose a subscription, App type, App name, Resource group, Slot, script path for the deploy service as shown in the image.
  3. Select "Deploy to Slot or App Service Environment".
  4. Select Enabled under Control Options and add the custom condition. and(succeeded(), eq(variables['DeployEnvironment'], 'Linux'))

Image Alt

Azure App Service Settings​

  1. Select Azure App Service Settings.
  2. Choose a subscription, App Service name, Resource group, Slot for the Azure app service.
  3. Under Application and Configuration Settings > connection strings, add the following code.
[
{
"name": "DefaultConnection",
"value": "$(ConnectionStrings.DefaultConnection)",
"type": "$(type)",
"slotSetting": false
}
]

Image Alt

Restart Azure App Service​

  1. Select restart Azure App Service.
  2. Choose a subscription, Action (Restart App Service) and App Service name for the Azure app service as shown in the image and select Save.

Image Alt