Reputation: 9849
Our pipeline indicates success after deployment.
When looking in "Kudo console" in folder wwwroot
i observe the following behavior:
Deploy Task is nothing special:
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy Frontend'
inputs:
ConnectionType: 'AzureRM'
azureSubscription: # subscription #
appType: 'webApp'
WebAppName: # appname #
packageForLinux: # package #
The artifact that gets build is approx. 17 MB of size and exists. I downloaded it. It is a ZIP file that can be extracted.
When looking at data\sitepackages
i observe the following behaviour:
All deployment runs have a size of 1 KB.
This explains why the ZIP cannot be extracted.
But WHY is it 1 KB?
UPDATE (1):
When we use the feature "Zip Push Deploy" from "Kudo Console" we can drag&drop the ZIP file that we have downloaded from our artefacts before. The zip gets extracted and the app is working! This means the ZIP in the artefacts is not corrupt.
UPDATE (2):
The complete run indicates success and produces a artefact with 17 MB. After Deployment the size of the ZIP file is 1 KB. There has to be an issue with the deploy task?
UPDATE (3):
Screenhot from Deploy Step that also shows success:
UPDATE (4):
MSFT support suggested to use V3 of the deploy Job: AzureRmWebAppDeployment@3
.
Same result.
UPDATE (5):
i have recreated the app service in the meanwhile (deleted and created).
Same result.
Upvotes: 7
Views: 12350
Reputation: 5075
The same error can happen when you're deploying to a new app service and directly to an app service slot that is configured incorrectly.
If you add a DevOps task Deploy Azure App Service
and you deploy to the production slot rather than the swap slot, and then later add a task Azure App Service manage
to swap it with the swap slot. You will have an empty website with no zip package but the pipeline will still have completed successfully.
Upvotes: 0
Reputation: 6508
I am almost certain that the package path is not correct in your yaml step. Should be something like below. Unfortunately, the misleading part is pipeline shows succeeded with the wrong path.
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy Frontend'
inputs:
ConnectionType: 'AzureRM'
azureSubscription: # subscription #
appType: 'webApp'
WebAppName: # appname #
packageForLinux: '$(Pipeline.Workspace)/**/*.zip'
There is also a similar past question.
Upvotes: 6