0
votes

So I'm using Visual Studio, Git, and Visual Studio Team Services. I've got my "test" site running as an Azure web app and continuous deployment is set up. So I push from my local PC to VSTS, which then updates the test app. So far so good.

Main question: Can I also set up continuous deployment for a second web app, which would be the "real" or "live" site on a different domain, by linking it to the same VSTS repository? So is it possible to link two Azure web apps to one VSTS repository?

The workflow I'm thinking of using would be to disable continuous deployment for the live app, push the change, which will update the test app, make sure it's all working, and then re-enable continuous deployment to the live app and push a trivial change, which would update both, or just pull in the latest from the repository to the live app if it's possible to do that. Is this a good strategy? I've never deployed anything before and welcome any and all advice.

1

1 Answers

2
votes

Yes, the better way is using two branches of a repository.

  1. Create a new branch in that repository (e.g. Test, there are Test and master branches now)

  2. Configure continuous deployment for each app service to use corresponding branch of a repository

If you are using azure CD:

enter image description here

If you are using Build and Release, you can create two build definitions and two release definitions for test and live site. (a build for a branch and a release link to a build and deploy to a site)

enter image description here