Azure 发布管道不断将“.scm”添加到应用服务的 URL
Azure release pipeline keeps adding ".scm" to the appservice's URL
我有一个名为 compspiadev 的应用程序服务,我正在使用 Azure 的管道来设置 CI/CD。创建构建管道并将项目构建到工件中以在构建管道中使用它。当我尝试部署时出现以下错误:
现在我的 appService 没有“.scm”。参与其中,在我的配置中,我没有将名称设置为具有 KUDU 端点,它会自动添加它:
如何解决此问题以使其正确部署?
正如在第一张图片的错误消息(URL 部分)中可见的那样,您正在部署到 App Service Environment(这是一种特殊的 cookie)。
The Azure App Service Environment is an Azure App Service feature that provides a fully isolated and dedicated environment for securely running App Service apps at high scale.
正如我们在第二张图片中看到的,您没有选中复选框“部署到插槽 或应用服务环境 ”。
选中该复选框,指定资源组名称,将插槽名称设置为生产,您应该可以开始了。
If the deployment target is an Azure App Service environment, leave the slot name as production and specify just the Resource Group name.
来源:Azure App Service Deploy task - Prerequisites for the task
你猜对了。这是一个网络错误,因为我们的 Azure devops 托管代理无法连接到 ILB ASE 的内部部署端点。 (正如我在此 中提到的,我从后端检查了您的应用程序,发现它正在连接到 ILB ASE。)
你可以查看这个source code (actual working code snippet,我无法帮助你找到确切的代码行,因为我不知道你使用的部署方法),你会发现通过Azure app service deploy
任务部署Azure应用程序的过程实际上是将应用程序文件与Kudu服务通信的过程(xxx.scm.azurewebsite.net).
例如,如果您使用 运行 包 类型来部署您的网络应用程序,您可以参考此 code snippet.
根据此 doc 配置 ILB ASE 后,scm 站点仅在 <appname>.scm.<asename>.appserviceenvironment.net
可用。但是您应该知道 Hosted agent 是一个 dynamic-distribution Azure VM,它既不在也不连接到虚拟网络。
这就是您遇到无法连接到远程计算机的错误的原因 <appname>.scm.<asename>.appserviceenvironment.net
。
要解决此问题,您需要使用私有代理来执行您的部署管道。关于如何配置一个有效的self agent,让它可以和你的私有DNS通信,你可以按照这个 or this blog.
我有一个名为 compspiadev 的应用程序服务,我正在使用 Azure 的管道来设置 CI/CD。创建构建管道并将项目构建到工件中以在构建管道中使用它。当我尝试部署时出现以下错误:
现在我的 appService 没有“.scm”。参与其中,在我的配置中,我没有将名称设置为具有 KUDU 端点,它会自动添加它:
如何解决此问题以使其正确部署?
正如在第一张图片的错误消息(URL 部分)中可见的那样,您正在部署到 App Service Environment(这是一种特殊的 cookie)。
The Azure App Service Environment is an Azure App Service feature that provides a fully isolated and dedicated environment for securely running App Service apps at high scale.
正如我们在第二张图片中看到的,您没有选中复选框“部署到插槽 或应用服务环境 ”。
选中该复选框,指定资源组名称,将插槽名称设置为生产,您应该可以开始了。
If the deployment target is an Azure App Service environment, leave the slot name as production and specify just the Resource Group name.
来源:Azure App Service Deploy task - Prerequisites for the task
你猜对了。这是一个网络错误,因为我们的 Azure devops 托管代理无法连接到 ILB ASE 的内部部署端点。 (正如我在此
你可以查看这个source code (actual working code snippet,我无法帮助你找到确切的代码行,因为我不知道你使用的部署方法),你会发现通过Azure app service deploy
任务部署Azure应用程序的过程实际上是将应用程序文件与Kudu服务通信的过程(xxx.scm.azurewebsite.net).
例如,如果您使用 运行 包 类型来部署您的网络应用程序,您可以参考此 code snippet.
根据此 doc 配置 ILB ASE 后,scm 站点仅在 <appname>.scm.<asename>.appserviceenvironment.net
可用。但是您应该知道 Hosted agent 是一个 dynamic-distribution Azure VM,它既不在也不连接到虚拟网络。
这就是您遇到无法连接到远程计算机的错误的原因 <appname>.scm.<asename>.appserviceenvironment.net
。
要解决此问题,您需要使用私有代理来执行您的部署管道。关于如何配置一个有效的self agent,让它可以和你的私有DNS通信,你可以按照这个