I'm trying to deploy an Azure App Service using Azure Devops.
I'm using the Task Azure App Service deploy version 4.*
I started noticing the following error in the log recently with the deployment failing (saw it first on 24th September)
Applying JSON variable substitution for **/appsettings.json
##[error]Error: NO JSON file matched with specific pattern: **/appsettings.json.
In the pipeline I use the task Extract files to extract *.zip, then use the result to search for **/appsettings.json.
The same task was running fine till a few days ago.
I tried redeploying an old release which was successful earlier, but it failed now with the same above error.
I double checked, there was no changes done in the pipeline recently for this to break.
How can I fix this.
Turns out my issue was not with the task
Azure App Service deploy, but with the taskExtract Files.A rough look on my pipeline is as below:
Before the fix
The
JSON variable substitutionfailed because theExtract filestask was not able to find*.zipfiles in the root folder and hence extracted nothing. So, there was noappsettings.jsonfile in the folder structure at all.The Fix
Extract filestask search pattern as**/*.zipNow my pipeline looks like below.
It now works fine for me.