How can I disconnect my deployment source from my Azure Web App > Deployment center? Using Github as source

kaitlynm 21 Reputation points
2021-11-16T15:41:22.86+00:00

Hi all,

I rarely use forums to make my own posts, usually reading others however I am new to Azure and working on an existing Web App service within my organisation. I had some changes I needed to push to the site and the setup is that the repository is kept on GitHub which should be linked to the Web app service in Azure and my YAML file instructs my Github action that on a "push" to the specified branch on the repo, npm install & npm run should be performed, and then it should deploy to Azure using - "azure/webapps-deploy@v2" - this is the 'build' task. However I ran into an error when attempting this, 'build' task could not be completed.
149798-image.png

I'm sure this error is arising from an issue/bug with the CI source control with Github as from looking into the Deployment Center, an account was not signed in/authorised to the application therefore all the Settings were blank except the Branch being set to 'master' even though I don't have any branches called 'master'. I can authorise it using a button but when I connect the account there are no further options to set the branch, repo, or organisation settings. This is also causing my Web App > Overview section > Github project to display like so

149778-image.png 149779-image.png149838-image.png

I've been stuck on this for a while and researched a lot into but can't find a similar issue anywhere else, I would like to set the branch, repo and org fields, I have tried using the CLI to manually change these settings and accessing the information is fine but making a change to the source config using commands raises a 'Bad Request'. I have the permissions to make the changes described but can't seem to complete it. When researching I looked into disconnecting the source in order to restart the process of setting up a CI source from github and found a guide showing a button to simply 'disconnect', but that is nowhere to be found on my portal as seen above.
149901-image.png
Also from looking at other resources for help, the displayed UI for my Deployment Center within the Web App is not the same as what I've seen, I'm not sure if it is outdated or what I see is because the setup for the CI source/integration was previously completed but as it disconnected its now broken? Furthermore there are two application settings that don't seem right - GIT_BRANCH + GIT_REPO, the values for both seem to be default and I'm not sure if they should be customised to the correct Github details.
149881-image.png

Any help on this would be greatly appreciated and I understand if I'm potentially going the wrong route about this.... ? Just need to get these changes deployed

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
207 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,866 questions
{count} votes

Accepted answer
  1. Ryan Hill 25,661 Reputation points Microsoft Employee
    2021-11-17T18:51:59.003+00:00

    Hi @kaitlynm ,

    You can use the Azure CLI to disconnect your GitHub from your deployment center. Just run the following command.

       az webapp deployment source delete --resource-group {your-resource-group} --name {your-app-service-name}  
    

    Before doing so, the fact you don't see the Disconnect link on your Deployment Center blade could indicate a small bug in the portal. If you could capture a .har file from your browser dev tools Network tab and follow the directions in the private comment below on how to send so we can see what's going here.

    Ref: https://learn.microsoft.com/en-us/cli/azure/webapp/deployment/source?view=azure-cli-latest#az_webapp_deployment_source_delete

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful