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,
I gave up to try remote build after I found the github page for Azure Pipelines Tasks, and found many other similar issues.
See in particular
Seems remote build with the given task doesn't work specifically for Linux Consumption Plan (maybe Python in particular as well?).
Resolved it by just building requirements.txt myself during build task, iso remote-build or installing azure cli tools and using func publish command (got permission denied errors).
- bash: |
if [ -f extensions.csproj ]
then
dotnet build extensions.csproj --output ./bin
fi
pip install --target="__app__/.python_packages/lib/site-packages" -r __app__/requirements.txt
displayName: "Build requirements.txt"
- task: ArchiveFiles@2
I know this is an old thread, but I've been fighting the same issues with Azure Pipelines, and what ultimately worked for me without having to add any '.js' files to the root or run custom inline scripts was to switch from using the 'AzureFunctionApp@1' task to the 'AzureWebApp@1' task with the options shown above (e.g. "deploymentMethod: zipDeploy").
It seems this task does not add the 'WEBSITE_RUN_FROM_PACKAGE' setting automatically like the 'AzureFunctionApp@1' task does.