Package deployment using ZIP Deploy failed with Azure DevOps Pipeline - azure

I am trying to deploy an application to windows based App Service in Azure using Azure DevOps Pipeline. For the first time, I don't see any issues and deployment got successful. But the next time, it got failed. I am getting the below error.
Failed to deploy web package to App Service.
To debug further please check Kudu stack trace URL : https://$XYZ-dev:***#XYZ-dev.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace
Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
When I go to the App Service in Azure Portal and from Deployment Center if I disconnect and trigger the pipeline, it get successful. But again next time it got failed.
Please anyone let us know the fix for this issue.
Thanks.

Related

Unable to connect to azure pipeline, but deploy still works in app service deployment center?

I keep getting this error message in the Azure App service deployment center:
We were unable to connect to the Azure Pipeline that is connected to
this Web App. This could mean it has been removed from the Azure Dev
Ops Portal. If this has happened, you can disconnect this pipeline and
set up a new deployment pipeline.
The thing is, it stil says that it successfully deploys, but If you try to access swagger for example, you get an HTTP error 500, (swagger does work localy). I have tried restarting the app service, going back commits, to see if that would help, but nothing is working. All Json data has been doubel chekced so that isn't the problem either. Anyone know of a fix?
We were unable to connect to the Azure Pipeline that is connected to this Web App. This could mean it has been removed from the Azure DevOps Portal. If this has happened, you can disconnect this pipeline and set up a new deployment pipeline.
Th error says that files are missing in the current build , try with new deployment pipeline.
You might have added an archive step in the build pipeline. This causes the artifact to be zipped before publish.
In the release pipeline if you use Azure App Service Deploy task , This internally uses Zip Deploy, that will zip the files.
Remove the archive step, the double zipping will be avoided.
HTTP error 500
Make sure the XML documentation file output is in bin and not in bin\Debug or bin\Release (verify this for all build configurations).

"Directory does not exist: /opt/hostedtoolcache/node/0.9.0/x64/bin"error in Azure DevOps and Azure App service

I have scheduled a release in Azure Devops Three times build is failed with error and after third time again build is done successfully but deployment is failed with below error
Failed to deploy web package to App Service.
Error: Package deployment using ZIP Deploy failed. Refer logs for more details
Anyone please help me to find the problem

How to Start/Stop IIS on the target Windows server before deployment in Azure Devops Pipeline

I created the step in Azure Devops to Start and Stop IIS Website but it is failing with below error message:
**2020-05-23T10:28:04.7393424Z ##[section]Starting: Start
2020-05-23T10:28:04.7659676Z
2020-05-23T10:28:06.5436980Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" start site /site.name:"taxrpt-deva"
2020-05-23T10:28:06.6132349Z ERROR ( message:The W3SVC service is not available - try starting the service first. )
2020-05-23T10:28:06.7434786Z ##[error]Process 'appcmd.exe' exited with code '50'.
2020-05-23T10:28:06.7680874Z ##[section]Finishing: Start
**
Azure IIS Web App Manage Screen Shot
How to Start/Stop IIS on the target Windows server before deployment in Azure Devops Pipeline
According to the image you provided, you are using the Deprecated task IIS Web App manage:
To resolve this issue, please try to use the task WinRM - IIS Web App Management.
Hope this helps.
As per the first line of question, you want to stop the IIS website infact rather than IIS.
The simplest way is to create a blank file 'App_Offline.htm' in the deployment directory. Official reference link.
I assume that as you want to stop the IIS/webapp you should have access of the deployment directory. This approach should work even if your azure devops Agent is running on other network machine. This file will shutdown your application and after deploying the build artifacts you may run powershell command task to delete that file from the shared directory like shown in the sample:

Error in Setting up Azure DevOps Source control with an express web app

I'm trying to update a express web app and trying to connect VSTS source control to the same but I am getting the following error.
{"Code":"BadRequest","Message":"Repository
'UpdateSiteSourceControl' operation failed with
Microsoft.Web.Hosting.WebHostingException: AADSTS700027: Client
assertion contains an invalid signature." }
I had an express web app setup with VSTS and it was successfully connected with source control. I haven't changed anything but I am not sure what this error means. I was able to use Azure pipelines but I wasn't able to use "App Service build service" to connect to VSTS. I am not sure what am I doing wrong here. Any help would be appreciated.
This issue was related with an Azure update. They fixed it and the continuous integration via Kudu is working again.

Azure webservice Deployment Error

I am trying to deploy the changes to the azure web service but weird error of Unmerged file in the deployment scripts from Azure is coming.
It says that the code is pushed to the repository but unable to deploy.

Resources