Review Apps in Azure Pipelines

Atul Malaviya

Git is an incredibly effective way to collaborate on application development. Developers collaborate in feature branches and Pull Requests(PRs). Developers submit PRs for review, and once the review is complete the code change is merged into the main branch. This process works well for static code diffs where newly committed code is reviewed to meet the team’s coding practices.

You can extend this further by triggering a Continuous Integration process on each PR which will build the code, run different type of tests. This helps in ensuring that the new changes meet the quality standard, that there are no breaking changes etc.

Unfortunately, this process is limited to team members who directly work on that specific part of the application and have context to provide reliable feedback. Additionally, when working with microservice applications, there is minimal visibility into the end-to-end impact on the application behavior when modifying an individual service. This is where the new Review Apps feature in Azure Pipelines can help.

The new Review Apps feature in Azure Pipelines, currently available in public preview, works by deploying every pull request (PR) from your Git repository to a dynamically-created Environment resource. You and your team can see how the changes in the PR look, as well as work with other dependent services before they’re merged into the main branch and deployed to production. This significantly helps you to “shift left“ and improves developer/team productivity and application quality.

You can use the “new Pipeline creation” feature to set up Review Apps in just two simple steps. We have added these features for Kubernetes first, and in the next few months will be work on adding support for other Azure services as well.

Once you have configured review app you will have a working Pipeline YAML in your Git repository Now you can:

  • Create a new branch for changes you want to commit
  • Start a Pull Request (PR) so other team members can review the code changes
  • A Review App is created with latest changes in the pull request deployed to a dynamically created environment resource
  • For each commit to the same branch, changes are deployed again. The PR will have the details of deployments done
  • Once the PR has been reviewed and accepted, the feature branch is merged into master where it’s deployed to a staging environment
  • After been approved in staging, the changes that were merged into master are deployed to production

The key is in constantly updating these dynamically-created review environment resources as you continue to work. With this in place, you get the preview of every branch pull request. This is perfect for complex changes, especially in a micro-services scenario, where static code review and/or unit testing is not enough.

If you are using Azure Kubernetes Service (AKS) with Azure Dev Spaces and Azure Pipelines, you can easily test your PR code in the context of the broader application running in AKS. As a bonus, team members such as product managers and designers can become part of the review process during early stages of development.

Please try out Review Apps and share your feedback via Twitter on @AzureDevOps, or using Developer Community.

1 comment

Discussion is closed. Login to edit/delete existing comments.

  • Mosley, Tillman III 0

    What happens to the review app after the PR has been reviewed and accepted?

Feedback usabilla icon