skip to Main Content

Our web application is hosted with Azure App Service and the ‘Health check’ feature is enabled for this app.

enter image description here

I have noticed that every time I run a release pipeline (for deployment), this feature gets reset to Disabled settings.

enter image description here

How can I prevent this ‘resetting’ of health check setting? If it is impossible then is there a way to activate it during a pipeline?

2

Answers


  1. Chosen as BEST ANSWER

    I achieved it by using an Azure CLI task in the release pipeline. The task contains the following script:

    az webapp config set -g $(resourceGroup) -n $(WebAppName) --generic-configurations "{"healthCheckPath": "/health"}"
    

  2. You need to add the Configuration setting in Release pipeline to enable Health Check like below:-

    enter image description here

    enter image description here

    healthCheckPath /api/health/
    
    

    After running the pipeline > Health check got enabled after adding the setting above in Release pipeline:-

    enter image description here

    In the pipeline Logs the Setting was applied successfully like below:-

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search