Search code examples
azure-web-app-serviceazure-powershellazure-functions

Azure-Web-sites: How to cancel a deployment?


I have an Azure Function App / Azure Website setup with continuous deployment from source-control.

This App has a custom deployment script that takes quite a bit of time to run. Occasionally I push out a change to git which was a mistake, and I want to cancel that one deployment (While still allowing future git pushes to cause a deployment).

Is there a PowerShell command I can run, or some option which will cancel my current deployment?


Solution

  • I was able to figure this out eventually, and figured I'd post it here. There is no "clean" way to do this, but there is a "hack".

    1. Navigate to your SCM site:

      [YOUR_WEBSITE].scm.azurewebsites.net

    2. Click on "Process Explorer"

    3. Find the process which is the current deployment and choose "Properties".

    4. Scroll to the bottom of the page and choose "Kill"

    Voilà, you've killed your deployment in the middle.