When i put my war file on D:\home\site\wwwroot\webapps and restart my app, no directory are create
Do you have some solutions ?
Logs of deployment:
2021-03-22T11:42:58.0110686Z,Updating submodules.,1bd3e5b1-47f2-46ce-9457-f22ade6578aa,0
2021-03-22T11:42:58.0891711Z,Preparing deployment for commit id 'c6e8c194dd'.,0e358782-a7e2-489c-a948-8d092e2167bb,0
2021-03-22T11:42:58.3235865Z,Generating deployment script.,f5b0c67e-46f7-462d-8910-d82e86d2d6ca,0
2021-03-22T11:42:58.3704629Z,Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --basic --sitePath "D:\home\site\repository"').,,0
2021-03-22T11:42:58.4016684Z,Running deployment command...,c4320046-f4d1-4886-8e7b-bd831740e0d4,0
2021-03-22T11:42:58.4172963Z,Command: "D:\home\site\deployments\tools\deploy.cmd",,0
2021-03-22T11:42:59.9329442Z,Handling Basic Web Site deployment.,,0
2021-03-22T11:43:01.1360454Z,Creating app_offline.htm,,0
2021-03-22T11:43:01.1516687Z,KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot',,0
2021-03-22T11:43:01.1516687Z,Copying file: 'bin\apache-tomcat-8.0.33\webapps\sapws.war',,0
2021-03-22T11:43:01.1672937Z,Deleting app_offline.htm,,0
2021-03-22T11:43:01.1672937Z,Finished successfully.,,0
2021-03-22T11:43:01.2297946Z,Running post deployment command(s)...,24cd4f28-8e09-4dd3-884f-7a78ac72e1cb,0
2021-03-22T11:43:01.3079454Z,Triggering recycle (preview mode disabled).,24b334b7-e6c1-428f-a9ac-d91f039188c6,0
2021-03-22T11:43:01.4172916Z,Deployment successful.,9512433d-cee0-45c2-a8fe-4bf173281d0b,0
You can use the method in my gif to test and deploy.
You also can use below way to deploy webapp.
Deploy your app to Azure App Service with a ZIP or WAR file
Related
hope to get some help as I'm struggling to get a NextJS or any type of node project to successfully deploy on Azure with DevOps pipeline.
I have all the steps and configuration working on the Repo PR to then run a build and finally the triggered Release. It will pull down the zip artifact from the build, however I always get an error on the agent job for the task "Azure Web App Deploy".
In short the job appears to always run a yarn install command vs. the Startup Command setting.
My setup is as follows:
Task Settings
Azure Web App Deploy task error
Tried with different Startup commands, which none display in the task.
I added the following in the "Application and Configuration Settings" section of the task:
-SCM_DO_BUILD_DURING_DEPLOYMENT FALSE
-build-remote true
At work I'm using Visual Studios 2019 to publish my ASP.Net Core 2.1 App to the Azure App Service. At home I run a linux maschine and use VS Code to work on the project. Now I'm having trouble to deploy the app to Azure using 'Deploy to Web App' in VS Code. The process finishes successfully but when I open the url I get an 'IIS 502.5 Error - Process Failure'. Using Visual Studio this does not happen.
Before deploying the app I tried to build it using
dotnet build -c Release
with no success. I also tried
dotnet publish -c Release -f netcoreapp2.1 --no-self-contained
with no success too. Both commands followed by 'Deploy to Web App'.
Am I doing something wrong or do I miss some build-option?
Got it myself. Found the solution here.
You just have to set the deploySubpath to the directory where dotnet publish puts the generated files. In my case I had to set it to project_1/bin/Release/netcoreapp2.1/publish, which will be created by the command dotnet publish -c Release.
You can set the deploySubpath value in Settings > Extensions > Azure App Service or by editing the file settings.json in the .vscode directory. This directory will be created in the root directory of your workspace.
Be careful to always set the deploySubpath relatively to your .vscode directory. In my case my workspace looks like this
-- .vscode
:- project_1
`- project_2
where project_1 is my ASP.Net Core project and project_2 is a nodejs project.
How to delete files in Azure kudu after the deployment ? I wrote some Powershell script using Azure app service deploy task after the deployment using post deployment action step but I couldn't able to delete the files.
I have simple-test.log and simeple.txt files exist in azure kudu.Please help me to solve this issue.
Script:
if((Test-Path 'D:\home\site\wwwroot'))
{
rm simple*
Write-Host "Simple log file is exist,removed"
}
KUDU Log:
KUDU LOG FILES
Deployment Log Snap
using kudu you would need to put it under site\deployments\tools\PostDeploymentActions. then kudu will run it after every deployment automatically. All the ps1, bat, cmd under that directory would be run by kuku
you can also put it to a custom directory, but you'd need to tell kudu where to get it by setting this setting: SCM_POST_DEPLOYMENT_ACTIONS_PATH.
Reading: https://github.com/projectkudu/kudu/wiki/Post-Deployment-Action-Hooks
I am trying to establish a continuous integration and deployment process for my Azure Function Apps using JavaScript.
I've chosen the LocalGit option to deploy.
However the Kudu Deployment Script is giving me the following error (full log):
:::::::::::::: log.log ::::::::::::::
2017-11-21T17:22:58.4132910Z,Updating branch
'8a7cb2d0d1211305eef99deec082da5501f56e64'.,
880855f9-c7b3-47cf-bf3f-773ce1ac0f05,0
2017-11-21T17:22:59.2138570Z,Updating
submodules.,72526e2b-9f58-47a1-b493-899e3962b016,0
2017-11-21T17:22:59.3622250Z,Preparing deployment for commit id
'8a7cb2d0d1'.,582835b0-c3d6-49d1-a3e6-54c5be02bdc8,0
2017-11-21T17:23:00.2594900Z,Generating deployment
script.,94d00c16-854c-49d1-8be2-36db8a654251,0
2017-11-21T17:23:00.5860790Z,Using the following command to generate
deployment script: 'azure site deploymentscript -y --no-dot-deployment
-r "/home/site/repository" -o "/home/site/deployments/tools" --functionApp --sitePath "/home/site/repository"'.,,0 2017-11-21T17:23:01.7712540Z,Generating deployment script for function
App,,0 2017-11-21T17:23:01.7980550Z,error: Only batch script files are
supported for function App,,1 2017-11-21T17:23:01.8517310Z,error: Only
batch script files are supported for function
App\n/opt/Kudu/bin/Scripts/starter.sh
"/opt/Kudu/bin/node_modules/.bin/kuduscript" -y --no-dot-deployment -r
"/home/site/repository" -o "/home/site/deployments/tools"
--functionApp --sitePath "/home/site/repository",,2 2017-11-21T17:23:02.2706970Z,App container will begin restart within
10 seconds.,244baa05-fb96-41e5-b570-c2dcd3b9087e,0
What could be the problem? Obviously I don't have any batch script and the Function App could be deployed and is up and running through the Azure Console.
I am using Function App Runtime version: 2.0.1.0 (~1)
The problem was that my Function App Runtime was running on Linux. This doesn't seem to support deployment via local Git.
I spun up a Windows Function App Runtime, and now the deployment works.
I had Composer Site extension installed till now on azure php webapp.
I need custom deployment that can run grunt tasks also. So I created the .deployment and deploy.sh files in project root. But that deploy.sh is not being picked up.
.deployment file contents:
[config]
command = bash deploy.sh
Looking at the deployment logs, I find this
2017-05-04T06:21:03.9301086Z,Updating submodules.,8bc3029f-d77b-4c1e-860f-a3d439d7a354,0
2017-05-04T06:21:03.9926050Z,Preparing deployment for commit id 'e2b45fb52b'.,61c286b1-5c00-4c11-ae14-54e0711d6857,0
2017-05-04T06:21:04.2632947Z,Running custom deployment command...,e71c397e-bc63-4357-abc4-acd49bc2041d,0
2017-05-04T06:21:04.3101663Z,Running deployment command...,24db1c4f-8a51-463b-8c4a-ee040bc5dfd8,0
2017-05-04T06:21:04.3101663Z,Command: D:\home\SiteExtensions\ComposerExtension\Hooks\deploy.cmd,,0
2017-05-04T06:21:04.4039215Z,The system cannot find the path specified.,,1
2017-05-04T06:21:04.4195462Z,The system cannot find the path specified.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\62.60430.2807\bin\Scripts\starter.cmd D:\home\SiteExtensions\ComposerExtension\Hooks\deploy.cmd,,2
Seems like somewhere the trigger for Composer site extension still remains which is being invoked during deployment.
How can I completely remove Composer site extension and use my custom deployment script deploy.sh? Thanks in advance.
Found the problem. After uninstalling Composer SiteExtension, this environment variable is still present APPSETTING_COMMAND = D:\home\SiteExtensions\ComposerExtension\Hooks\deploy.cmd. Deleted the environment variable using kudu console and then deployment succeeded.
After removing the Composer Extension the APPSETTING_COMMAND remains as an environment variable.
Use the Kudu PowerShell command Remove-Item Env:\APPSETTING_COMMAND to remove the variable online.
Alternatively, restarting the App Service via the overview tab will refresh the environment variables, though this could be a little invasive.