[英]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.