Fork GitHub inside Bitbucket cloud & define Bitbucket as the deployment source inside Azure web app

john john Pter 1,040 Reputation points
2024-10-29T00:23:03.4033333+00:00

I want to Fork this GitHub repository microsoft-teams-emergency-operations-center inside our Bitbucket repo, as we need to do some customization which are specific to our organization. 

So, I did those steps: -

1) Clone the GitHub Repository to my Local Machine:- git clone https://github.com/OfficeDev/microsoft-teams-emergency-operations-center.git

  1. Define Bitbucket repository as a remote

git remote add bitbucket https://bitbucket.org/bitbucket-username/bitbucket-repo-name.git

  1. git fetch bitbucket
  2. git push bitbucket main
  3. then i modified some files using Visual Studio Code
  4. git add . git commit -m "Saved"
  5. git push bitbucket main

Where we got the GitHub files inside Bitbucket, then I created a new Web App inside Azure, and I defined the Bitbucket repo as the deployment source and i did the deployment. and everything seems to work well.

User's image

Then today i did 2 modifications/commits to the Bitbucket repo files on the cloud, as follow:-

User's image

and i noted that 2 new deployments were executed automatically inside Azure Web App.

User's image

So, I have those two questions if someone can answer them please:-

  1. Are my steps to Fork a GitHub repo inside Bitbucket valid? or I am doing thing wrongly?
  2. Now let say the upstream on GitHub do new changes, will those changes get applied directly to our Bitbucket? and hence the Azure web App will get a new deployment? If this is the case, then can we prevent this? so we can test any changes done on the upstream before getting them deployed automatically inside Azure Web app?

Thanks

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 24,951 Reputation points Microsoft Employee Moderator
    2024-10-29T05:08:41.54+00:00

    @john john Pter Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.

    Are my steps to Fork a GitHub repo inside Bitbucket valid? or I am doing thing wrongly?

    Yes, the steps you are following are correct. you can also refer to this similar Github post on how to fork a GitHub repo in bitbucket.

    Now let say the upstream on GitHub do new changes, will those changes get applied directly to our Bitbucket?

    No, the updated changes in the original/master repo will not be in reflected into your forked repo you need to update and pull the content as mentioned here in the similar SO thread here.

    and hence the Azure web App will get a new deployment? If this is the case, then can we prevent this? so we can test any changes done on the upstream before getting them deployed automatically inside Azure Web app?

    Once you have set up Bitbucket as the source control for continuous deployment in App Service, a webhook will be created in Bitbucket to monitor any changes made to the repository. Whenever a commit is made to the repository, webhook will initiate a deployment to app service to make the recent changes available.

    If you want to stop this kind of mechanism instead of adding your bitbucket repo in continuous deployment in app service you need to create the bitbucket pipeline of your own by using different triggers in bitbucket and add the steps which are required to build and deploy your application to app service.

    Hope this helps, let me know if you have any further questions on this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.