For some bizarre reason, every time I deploy my web app on Azure, it creates a folder named "b" within the wwwroot folder of the app service, where it then places the artifact zip file.
I can't find any setting on Azure that would cause the creation of this subfolder, and I can't find any information about this online.
I've been able to work around this issue by setting the physical path in my azure web app to "site\wwwroot\b", and running a post deployment script to cd into that directory:
However, now I've noticed that if I create an App_Data folder inside the "b" folder, which I wanted to add for persistent data throughout deployments, the Azure app service pipeline will now create another subfolder called "b" within the existing "b" folder.
In theory I could just cd into the next b subfolder, but I feel like I shouldn't even have to do this to begin with.
Here's my release pipeline:
steps:
- task: AzureRmWebAppDeployment@4
displayName: 'Azure App Service Deploy'
inputs:
azureSubscription: 'PAYG(guid)'
WebAppName: AppName
ScriptType: 'Inline Script'
InlineScript: |
cd b
unzip AppName.zip
rm AppName.zip
enableCustomDeployment: true
RemoveAdditionalFilesFlag: true
AdditionalArguments: '-skip:objectName=dirPath.absolutePath=wwwroot' //this is something i tried in an attempt to force the root folder but didn't work
RenameFilesFlag: false
continueOnError: true
Any ideas? I'm at a loss for where to look.
The issue was that the build pipeline I had was archiving twice, once on .net publish
, and once on archive files
task. Removing the archive task resolved the issue.