PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 28, 2022

[FIXED] How do I access deployment history in Azure Web Apps?

 September 28, 2022     azure, azure-web-app-service, continuous-deployment, continuous-integration, git     No comments   

Issue

I set up multiple deployment slots for a web app. We have continuous deployment configured on the staging slot, so each Git commit on a specific branch triggers a deployment to my staging slot. Once verified, we swap the staging and production slots. Is there a way to view (and redeploy if desired) the deployment history for a slot? I don't want to be limited to simply reverting the swap, but be able to select a specific deployment.

The Continuous deployment setting for the staging slot shows only two deployments, even though there have been many more. Is there a way to access the full deployment history?

Deployment History for Staging Slot


Solution

When dealing with slots, the behavior is a bit complex (and you might argue confusing!). The trickiness comes from the fact that the deployment history moves with the content of the site when you perform swaps.

I'll illustrate by example:

  • You start with a production slot (i.e. the main app), and a staging slot. No deployments have happened yet.
  • Deployment #1 happens to the Staging slot
  • You swap to production
  • At this point, you will see no history in the Staging slot because the history was swapped to the Production slot.
  • Now you deploy #2 to the Staging slot, and you swap Production.
  • The history on the Staging slot now has #1, as it got swapped back in there.
  • Deploy #3 and swap
  • The history on the Staging slot now has #2.
  • Next time you swap again, the Staging slot history has #1 and #3

So you get the idea: each slot will contain alternating history items. #1, #3, #5, etc in one slot, and #2, #4, #6, etc in the other.

To make this a bit more subtle, while both slot contain history items, the Portal only shows history for slots that are enabled for deployment. So while your Production slot contains history items, the Portal does not show them (this does need to be addressed).

As a workaround, you can go to https://{yoursite}.scm.azurewebsites.net/ and click on Deployments to get the deployment list in the Production slot. This is a REST API, and not a fancy UI.

Hopefully this helps clarify this admittedly confusing behavior :)



Answered By - David Ebbo
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing