You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to deploy a .Net 6 web api to a Linux app service in Azure using a YAML pipeline in Azure DevOps. My pipeline was working fine until I changed the file structure a bit (renamed the top-level folder from project to projectWebAPI). The first time I ran the pipeline after the rename everything worked fine. However, after making an inconsequential tweak to the code the pipeline began to fail during subsequent deployments at the kudu sync step.
Got service connection details for Azure App Service:'my-appsvc'
Package deployment using ZIP Deploy initiated.
Updating submodules.
Preparing deployment for commit id '111111-3'.
PreDeployment: context.CleanOutputPath False
PreDeployment: context.OutputPath /home/site/wwwroot
Generating deployment script.
Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "/tmp/zipdeploy/extracted" -o "/home/site/deployments/tools" --basic --sitePath "/tmp/zipdeploy/extracted/My ADO Project Name"').
Running deployment command...
Command: "/home/site/deployments/tools/deploy.sh"
Handling Basic Web Site deployment.
Error: From directory doesn't exist
An error has occurred during web site deployment.
Kudu Sync failed
\n/opt/Kudu/Scripts/starter.sh "/home/site/deployments/tools/deploy.sh"
Deployment Failed. deployer = VSTS_ZIP_DEPLOY deploymentPath = ZipDeploy. Extract zip.
##[error]Failed to deploy web package to App Service.
I spent quite a bit of time rolling code back and searching for an answer to no avail. I changed from AzureWebApp@1 to AzureRmWebAppDeployment@4 which didn't help. I finally stumbled across this issue where someone was reporting the same error that I was seeing : Error: From directory doesn't exist.
So I crawled through the code in this repo and in the KuduSync one, and finally determined that the generated --sitePath parameter was incorrect. My package was being unzipped to /extracted and not /extracted/My ADO Project Name. I tried nuking my generated deploy.sh file but it kept generating the same sitePath parameter. Finally, I edited the generated deploy.sh file directly using VIM in the Kudu console and my deployments began to work.
I don't know what I've configured to cause the script generator to include the name of my AZDO project in the assumed extraction path. Looking at the code it defaults to '.', so something must be passing in the name of the AZDO project. At one point I had the 'deployment center' for my app service hooked up to Azure DevOps which I thought could be the link, but removing it didn't help.
This feels like a bug to me, but I'm not sure so here I am posting about it.
I am trying to deploy a .Net 6 web api to a Linux app service in Azure using a YAML pipeline in Azure DevOps. My pipeline was working fine until I changed the file structure a bit (renamed the top-level folder from project to projectWebAPI). The first time I ran the pipeline after the rename everything worked fine. However, after making an inconsequential tweak to the code the pipeline began to fail during subsequent deployments at the kudu sync step.
I spent quite a bit of time rolling code back and searching for an answer to no avail. I changed from AzureWebApp@1 to AzureRmWebAppDeployment@4 which didn't help. I finally stumbled across this issue where someone was reporting the same error that I was seeing :
Error: From directory doesn't exist
.So I crawled through the code in this repo and in the KuduSync one, and finally determined that the generated
--sitePath
parameter was incorrect. My package was being unzipped to/extracted
and not/extracted/My ADO Project Name
. I tried nuking my generated deploy.sh file but it kept generating the same sitePath parameter. Finally, I edited the generateddeploy.sh
file directly using VIM in the Kudu console and my deployments began to work.I don't know what I've configured to cause the script generator to include the name of my AZDO project in the assumed extraction path. Looking at the code it defaults to '.', so something must be passing in the name of the AZDO project. At one point I had the 'deployment center' for my app service hooked up to Azure DevOps which I thought could be the link, but removing it didn't help.
This feels like a bug to me, but I'm not sure so here I am posting about it.
My rather mundane pipeline yaml:
The text was updated successfully, but these errors were encountered: