@Clement Fayol The deployment time can vary depending on the size of your application and the resources allocated to your deployment. However, 30-40 minutes seems like a long time for a deployment.
The line "Package deployment using ZIP Deploy initiated" indicates that the deployment package is being uploaded to Azure. This step can take some time depending on the size of your package and the network speed. You can try to optimize the package size by removing unnecessary files or compressing the files to reduce the upload time.
You can also try using the Kudu REST API to deploy your application instead of the AzureWebApp task. The Kudu REST API provides more control over the deployment process and can be faster than the AzureWebApp task. Here is an example of how to use the Kudu REST API to deploy your application:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$username = '$(username)'
$password = '$(password)'
$webAppName = '$(webAppName)'
$packagePath = '$(Pipeline.Workspace)/drop/$(Build.BuildId).zip'
$apiUrl = "https://$webAppName.scm.azurewebsites.net/api/zipdeploy"
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username, $password)))
Invoke-RestMethod -Uri $apiUrl -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Method POST -InFile $packagePath -ContentType "multipart/form-data"
This script uploads the deployment package to the Kudu REST API endpoint and deploys the application. You will need to replace the variables with your own values.