简体   繁体   English

Azure DevOps 发布管道在使用发布配置文件服务连接执行时失败

[英]Azure DevOps release pipeline is getting failed when executing with publish profile service connection

I am using the Azure DevOps release pipeline to deploy a web application built on top of Asp.Net Core to Azure app service.我正在使用 Azure DevOps 发布管道将构建在 Asp.Net Core 之上的 web 应用程序部署到 Azure 应用程序服务。 The app service is already up & running.应用服务已经启动并运行。

I created an azure resource manager connection with the publishing profile option through service connections.我通过服务连接使用发布配置文件选项创建了 azure 资源管理器连接。

[ARM-Publish Profile Service Connection][1] [ARM-发布配置文件服务连接][1]

Later I configured the release pipeline and used Azure app service deploy where I selected the publish profile connection.后来我配置了发布管道并使用了 Azure 应用服务部署,我选择了发布配置文件连接。

[Publish profile connection][2] [发布个人资料连接][2]

As you can see in the screenshot, I was not able to select the already created app service name in the dropdown so I manually entered the app service name and saved the pipeline.正如您在屏幕截图中看到的那样,我无法在下拉列表中找到已创建的应用服务名称 select,因此我手动输入了应用服务名称并保存了管道。

Once the release pipeline got triggered after the CI pipeline, the task failed with exception credentials can not be null .在 CI 管道之后触发发布管道后,任务失败,异常凭证不能是 null

Could someone please help me understand where I am making mistake?有人可以帮我理解我在哪里犯错吗? [1]: https://i.stack.imgur.com/uvuGN.png [2]: https://i.stack.imgur.com/gLyIl.png [1]: https://i.stack.imgur.com/uvuGN.png [2]: https://i.stack.imgur.com/gLyIl.png

I was not able to select the already created app service name in the dropdown so I manually entered the app service name and saved the pipeline, the task failed with exception credentials can not be null.我无法 select 下拉菜单中已经创建的应用服务名称,所以我手动输入应用服务名称并保存管道,任务失败,异常凭据不能是 null。

I can reproduce this problem on my side.我可以在我这边重现这个问题。 I think this is because the azure app service deploy task uses the service principal in the service connection to authenticate with Azure.我认为这是因为 azure 应用服务部署任务使用服务连接中的服务主体向 Azure 进行身份验证。

As a workaround, we can choose to use the service connection created with the " Service principal (automatic) " option instead of the service connection created with the " Publish Profile " option.作为一种解决方法,我们可以选择使用使用“ Service principal (automatic) ”选项创建的服务连接,而不是使用“ Publish Profile ”选项创建的服务连接。

在此处输入图像描述

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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