Hi Harvey Marshall,
Thanks for reaching out to Microsoft Q&A.
The 404 Not Found and 405 Method Not Allowed errors usually point to one of a few deployment misconfigurations in Azure Pipelines.
- 404 error occurs when the pipeline is unable to reach the Function App’s Kudu endpoint.
- This usually happens if the
appNameis incorrect or the Function App doesn’t exist in the specifiedresourceGroup.
I can see there is a mismatch between the appType and the actual app e.g., trying to deploy a Linux function app with appType: functionApp but not specifying linux.
- Make sure the Function App
ratepilotapiexists in thestargazerresource group in theUK Southregion.
package: '$(System.D
-name "API_URL" ...
The package input must point to the zip or folder containing your Function App artifacts package: '$(System.DefaultWorkingDirectory)/drop/functionapp.zip'. Make sure the path exists in the build artifacts.
- Change the version of task to
AzureFunctionApp@2
task: AzureFunctionApp@2
Example:
deploy:
steps:
- task: AzureFunctionApp@2
inputs:
connectedServiceNameARM: '$(azureSubscription)'
appType: 'functionAppLinux'
appName: $(functionAppName)
deployToSlotOrASE: true
package: '$(Pipeline.Workspace)/drop/$(Build.BuildId).zip'
runtimeStack: 'NODE|20'
deploymentMethod: 'auto'
Hope it helps!
Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you.