microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.49k stars 2.61k forks source link

Web Apps for Containers Not Pulling latest image #9530

Closed anton-dealmeida closed 5 years ago

anton-dealmeida commented 5 years ago

Troubleshooting

I've been troubleshooting and looking for logs, happens is the following. I follow the build pipeline and read the logs in Azure Container Logs

Environment

Issue Description

Azure DevOps: Build Pipeline - I have 2 steps, Docker Build, Docker Push. I push to Docker Hub.

Azur DevOps: Release Pipeline - I have 1 step, Deploy Azure App Service (using v4) for app type Web App for Containers (Linux)

My latest updated Docker image is not being pulled down in Azure itself. It's a little annoying as the expected behavior is for this release task to trigger that the web app runs a docker pull whatever:tag to get an updated version.

I am not tagging with the BuildID because I don't want 2 million tags in my Docker Hub repo at this point. I want a flat Docker Hub repository with only the main branches building.

azooinmyluggage commented 5 years ago

@anton-dealmeida we are investigating this with help from Web App team. I will reply with a solution.

vincent1173 commented 5 years ago

@anton-dealmeida , we are working on the fix.

anton-dealmeida commented 5 years ago

Hi there @vincentdass, was this ever resolved?

vincent1173 commented 5 years ago

@anton-dealmeida , the issue is reoslved.

anton-dealmeida commented 5 years ago

Awesome, but how?

So does that mean using the web deploy task for container's will trigger an image pull when the release happens?

On Thursday, May 2, 2019, Vincent A (vinca) notifications@github.com wrote:

@anton-dealmeida https://github.com/anton-dealmeida , the issue is reoslved.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/azure-pipelines-tasks/issues/9530#issuecomment-488628094, or mute the thread https://github.com/notifications/unsubscribe-auth/AEOAMRBMDIQI7BY43DWYDITPTLA75ANCNFSM4GVWAKSQ .

-- [image: Responsive]

Anton De Almeida | Developer 3 Woodlands Rd, Woodstock, 7925, Cape Town T: (+27) 21 201 1180 <+27212011180> E: anton@responsive.co.za W: goresponsive.com

kmkumaran commented 5 years ago

@anton-dealmeida - #9819 is the fix done for this. The Web deploy task will now trigger an image pull.

anton-dealmeida commented 5 years ago

Incredible! Thank you @kmkumaran! My browser bugged out, didn't see the the piece on Mar 18 where this was closed.

Kind regards!

jrm346 commented 5 years ago

Hi guys I'm getting the same issue. I use a devops pipeline to build my image and push it to an azure container registry. then use the webapp deploy for containers v4.* to deploy my image. when i log in to azure portal and go to the webapp and look at the deployment center tab it shows the deployment as successful but the new image is never pulled to the webapp.

vincent1173 commented 5 years ago

@jrm346 , Please use Azure Web App container task 1.* version and not Azure App Service 4.* task

jrm346 commented 5 years ago

Thanks for pointing that out now that you have i feel kinda dumb

CodeJuggernaut commented 3 years ago

I am confused about why we have the option to use the Azure App Service Deploy v4 task and can select "App Service type: Web App For Containers (Linux)" if it doesn't work properly?!

That option shouldn't exist. Then we would be inclined to server for the right "Task" which is the Azure Web App on Container Deploy.

That cost me many hours, and only thanks to @vincent1173 that I found out about it. Thanks!

Team, please consider removing the option to deploy container from the App Service task because it does not properly trigger an image pull and restart the container. It's very flake.

lack-of-gravitas commented 2 years ago

Tried @vincent1173 recommendation and trued to release with Azure Web App Container 1* and this still does not work. My pipeline is connected directly to a GitHub repo with a Dockerfile. Do I need to add an explicit intermediate step to build and push my image to Azure Container Registry?

CodeJuggernaut commented 2 years ago

@lack-of-gravitas Yes you need to build an push the image to the registry.