0

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 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

2 Comments

So if I understand correctly, the process should be: Before writing new code, create a test branch and develop in the test branch. Set up continuous deployment from the test branch to the test app. When happy with your changes, merge the test branch into the main branch, which should update the master branch and the live app. Is that right? I don't know anything about Build and Release, pros and cons over the previous approach, could you please give me some links to find out more?
@nmit026 Yes, you're right. Regarding VSTS Build and Release, you can refer to Implement continuous deployment of your app to an Azure App Services website

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.