简体   繁体   English

Azure AppService持续部署从容器注册表标签选择

[英]Azure AppService continuous deployment from container registry tag selection

I have an AppService which uses Azure Container Registry.我有一个使用 Azure 容器注册表的 AppService。
The docker images are built by the pipeline and pushed with a 'Docker push' task in Azure Release. docker 映像由管道构建,并在 Azure 版本中通过“Docker 推送”任务推送。
I am using semantic versioning, I put the version into the BuildNumber and to the image name.我正在使用语义版本控制,我将版本放入 BuildNumber 和图像名称中。

在此处输入图像描述

I can see my images being available in the DeploymentCenter, along with all the tags that have been pushed so far.我可以在 DeploymentCenter 中看到我的图像以及到目前为止已推送的所有标签。

在此处输入图像描述

However, whenever I create a Release in AZ DevOps, it does not automatically get deployed to the AppService.但是,每当我在 AZ DevOps 中创建发布时,它都不会自动部署到 AppService。 I have to go to the DeploymentCenter, pick the newest tag and then redeploy again ( restarting the app didn't seem to work, but am no 100% sure ).我必须 go 到 DeploymentCenter,选择最新的标签,然后再次重新部署(重新启动应用程序似乎不起作用,但不能 100% 确定)。

In any case, I would like the AppService to be updated and run the latest image automatically when the release succeeds in DevOps.无论如何,我希望 AppService 在 DevOps 中发布成功时自动更新并运行最新的图像。 Is that possible with the Docker push task to ACR? Docker push任务到 ACR 是否可行?

Also, I wonder - I have the 'Include latest tag' tickbox checked, but the 'latest' tag is not available in the tag dropdown in Deployment Center.另外,我想知道 - 我选中了“包含最新标签”复选框,但“最新”标签在部署中心的标签下拉列表中不可用。 Why is that?这是为什么?

Is that possible with the Docker push task to ACR? Docker 推送任务到 ACR 是否可行?

Of course, yes.当然,是的。 But the thing you need to know is the continuous deployment of the App Service only triggers for the one tag can it can't change.但是你需要知道的是,App Service 的持续部署只触发了一个标签,它不能改变。 Generally, we use the certain tag latest .通常,我们使用某个标签latest So you need to create the image with the tag latest all the time, don't use the default tag $(Build.BuildId) in DevOps.所以你需要始终创建带有标签latest的镜像,不要在 DevOps 中使用默认标签$(Build.BuildId)

I have the 'Include latest tag' tickbox checked, but the 'latest' tag is not available in the tag dropdown in Deployment Center.我选中了“包含最新标签”复选框,但“最新”标签在部署中心的标签下拉列表中不可用。 Why is that?这是为什么?

I'm not familiar with DevOps, but I think the include latest tag means the latest Build.BuildId , not one certain tag, so it will change each time when you create the image and push it.我对 DevOps 不熟悉,但我认为include latest tag是指最新的Build.BuildId ,而不是某个特定的标签,所以每次创建镜像并推送时它都会改变。 And it won't work for App Service Continuous Deployment.它不适用于应用服务持续部署。

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

相关问题 Azure容器注册表中的Azure App Service连续部署 - Azure App Service continuous deployment from Azure Container Registry Pulumi:添加Azure Web App Service web hook到Azure Container Registry进行持续部署 - Pulumi: Add Azure Web App Service web hook to Azure Container Registry for continuous deployment 在 Azure DevOps 持续部署期间无法获取资源类型“Microsoft.Web/Sites”和资源名称“AppService”的资源 ID - Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'AppService' during Azure DevOps continuous deployment 从不同的VSTS帐户进行Azure持续部署 - Azure continuous deployment from different VSTS account 从GitHub进行Azure连续部署和数据库升级 - Azure continuous deployment from GitHub and database upgrades 从TFS 2012 Update 2继续部署到Azure - Continuous deployment to Azure from TFS 2012 Update 2 使用 ARM 模板并行部署 Azure AppService - Parallel deployment of Azure AppService using ARM template 不会通过Bitbucket进行连续部署而传输Azure AppSettings - Azure AppSettings not transferred with continuous deployment from bitbucket 使用网络规则集对 Azure 容器注册表进行 Terraform 部署 - Terraform deployment of Azure Container Registry with Network Rule Set 天蓝色的连续部署失败 - azure continuous deployment fail
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM