Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/315.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 以增量方式将函数添加到Azure函数主机,而不覆盖已部署的函数_Python_Azure Functions_Azure Deployment - Fatal编程技术网

Python 以增量方式将函数添加到Azure函数主机,而不覆盖已部署的函数

Python 以增量方式将函数添加到Azure函数主机,而不覆盖已部署的函数,python,azure-functions,azure-deployment,Python,Azure Functions,Azure Deployment,我正在与多个团队合作,这些团队相互独立地开发和测试Azure功能,但希望将所有功能部署到一个集中的Azure功能主机,如下所示: 我知道的发布方法会覆盖主机上不需要的现有内容,我们努力实现增量更新(类似于问题,唯一的区别是我们在基于Linux的主机上使用Python而不是C) 我的问题是:最简单的方法是什么(假设两个项目的hosts.json和函数设置相同) 如果A队跑 curl -X POST -u <user> --data-binary @"./func1-2.zi

我正在与多个团队合作,这些团队相互独立地开发和测试Azure功能,但希望将所有功能部署到一个集中的Azure功能主机,如下所示:

我知道的发布方法会覆盖主机上不需要的现有内容,我们努力实现增量更新(类似于问题,唯一的区别是我们在基于Linux的主机上使用Python而不是C)

我的问题是:最简单的方法是什么(假设两个项目的hosts.json和函数设置相同)

如果A队跑

curl -X POST -u <user> --data-binary @"./func1-2.zip" https://<funcname>.scm.azurewebsites.net/api/zipdeploy
curl-X POST-u--data binary@“/func1-2.zip”https://.scm.azurewebsites.net/api/zipdeploy
在他们的发布管道中,然后团队B运行

curl -X POST -u <user> --data-binary @"./func3-4.zip" https://<funcname>.scm.azurewebsites.net/api/zipdeploy
curl-X POST-u--data binary@“/func3-4.zip”https://.scm.azurewebsites.net/api/zipdeploy

A队的func1和func2都不见了。在
https://.scm.azurewebsites.net/api/zip/
endpoint(如图所示)似乎根本没有发布函数。使用FTP时,我在site/wwwroot/中根本看不到任何文件,即使已经发布了功能。

您需要使用连续部署:

首先,在Github上创建一个repo,然后配置部署中心:

然后使用git将本地函数应用程序上载到Github:

echo "# xxxxxx" >> README.md
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin <git-url>
git push -u origin main
echo“#xxxxxx”>>README.md
初始化
git添加。
git提交-m“首次提交”
吉特分行-M主
git远程添加源
git推送-u源主
更新:

git init
git add .
git commit -m "something"
git branch -M main
git remote add origin <git-url>
git push -u origin main
git init
git添加。
git提交-m“某物”
吉特分行-M主
git远程添加源
git推送-u源主
请参阅本官方文件:


但这意味着我有一个集中的Git存储库。这在我的例子中是不需要的,每个团队应该只拥有自己的存储库。@SimonNobel在你的例子中,我认为没有实现增量部署的好方法。您可以找到的大多数部署方法都将覆盖原始项目。连续部署是增量部署,但连续部署不支持多个repo,基于linux的函数应用程序无法通过直接上传文件来修改项目。因此,不幸的是,没有办法做到这一点。