使用个人访问令牌部署 Azure 函数

Deploying Azure Function with Personal Access Token

我已经为我开发的 azure 函数创建了一个发布管道。但是要将工件发布到 azure 资源,有没有一种方法可以通过 PAT 部署它(就像我们如何将 VSS 扩展发布到市场)。因为订阅属于另一个人,但我希望能够部署。如果不是 PAT,当我没有订阅时是否有其他部署方式?谢谢

不知道是否有意义,因为我是新手:)

您可以通过“Manual mode”中的服务主体使用到 Azure 资源管理器的服务连接。

Manual subscription pipeline. In this mode, you must specify the service principal you want to use to connect to Azure. The service principal specifies the resources and the access levels that will be available over the connection. Use this approach when you need to connect to an Azure account using different credentials from those you are currently logged on with in Azure Pipelines or TFS. This is also a useful way to maximize security and limit access.

首先要求订阅的所有者创建一个具有订阅访问权限的服务主体(应用程序注册),然后只需在 DevOps 中创建服务连接(项目设置 -> 管道 -> 服务连接)具有适当的服务主体 ID、密钥、订阅 ID、名称等

你可以找到非常好的教程 here