简体   繁体   中英

Azure DevOps self hosted windows agent to Azure Linux function app deployment

I am working on Linux based Azure functions with Python 3.7 and trying to use Azure DevOps. My python project has requirements like psycopg2-binary, cython to name a few of them.

We have been provisioned a self hosted windows agent pool in Azure Devops. I am building a pipeline and my concern is that the deployment won't be successful since the build would happen on the dev agent (on windows) and deployment is on Azure Functions (linux).

Do we need a linux agent in this case?

Please advise.

Do we need a linux agent in this case?

As far as I know, you don't need to use a Linux agent to build the Python project.

You can directly use the python package built by windows agent to deploy to the linux azure function.

When you using tasks(eg Azure Functions task or Azure App Service deploy ) to deploy the package to Azure Function app, it will directly publish the packages and the Configuration to Azure Function app.

The prerequisite is that the deployed package meets the requirements of the task: the package is a zip or war file. So you need to use the Archive files task to pack the published files.

在此处输入图像描述

If the configuration of the python project can be run in the linux system, the same configuration can also be run in the linux Function App.

For more details about deploy a Python project to Azure, you could refer to this doc: deploy a Python web app to Azure App Service on Linux

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM