Azure Functions can automatically perform builds on the code it receives after zip deployments.
You can use this Azure Function App task
More read,
Deployment technologies in Azure Functions
Specially,
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm using puppeteer in a node.js function app on a linux machine successfully.
Currently I'm deploying it directly from VS Codee
![46659-cleanshot-2020-12-09-at-162855.png][1]
And this is the .vscode/settings.json
{
"azureFunctions.deploySubpath": ".",
"azureFunctions.projectLanguage": "JavaScript",
"azureFunctions.projectRuntime": "~3",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.scmDoBuildDuringDeployment": true
}
But I would like to deploy it with azure pipelines.
The thing is that for puppeteer to work you need to build during deployment.
Here is the tutorial that helped me figure this out: https://dev.to/azure/running-headless-chromium-in-azure-functions-with-puppeteer-and-playwright-2fgk
But I cant create a pipeline in that deploys builds it on server. I'm trying to use the setting SCM_DO_BUILD_DURING_DEPLOYMENT=true in app settings.
Any idea what steps to include or if there is any pipeline-template for that?
Azure Functions can automatically perform builds on the code it receives after zip deployments.
You can use this Azure Function App task
More read,
Deployment technologies in Azure Functions
Specially,
This is a great thread, I'm having the exact same issue. I tried setting WEBSITE_RUN_FROM_PACKAGE=0 but whenever I deploy from Azure DevOps it keeps resetting it to the package url. My devops yml looks the same as yours, I also created an empty server.js file but then my function stopped responding at all giving a 404 when it would usually find the function. How do you stop the pipeline from updating the WEBSITE_RUN_FROM_PACKAGE setting?
Ok, I tried to create a new function app and a new pipeline and got it working.
The difference is that I added an empty server.js file in the root.
According to this readme
a server.js or app.js file must be present for oryx to understand that it is a node.js project.
Also I deployed the function app in US West central, not in North Europe like the first function app.
Thanks a lot for your guidance :)
We're having the exact same issue, the deploy task AzureFunctionApp@1 always keeps adding adding WEBSITE_RUN_FROM_PACKAGE = package_url.
Even if we:
In our case we have Python (3.8) durable functions (V3) on a Linux Consumption Plan
Thanks for your answer!
So, I manage to push it as a zip file to the server. But it seems it does not build.
This is part of my pipeline:
stages:
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: ArchiveFiles@2
displayName: "Archive files"
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)"
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true
- task: AzureFunctionApp@1
condition: succeeded()
displayName: "Azure Functions App Deploy"
inputs:
azureSubscription: "$(azureSubscription)"
appType: functionAppLinux
appName: $(functionAppName)
deploymentMethod: zipDeploy
package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
When I deploy with this pipeline it adds the app config WEBSITE_RUN_FROM_PACKAGE: <url> to my function app. I believe that's why it doesnt build on server, but i can't figure out how to change that (I have deploymentMethod: zipDeploy in the pipeline). Do you see any error in my pipeline? Or is there any setting that is missing?
/Hector