Continuous integration and continuous deployment

Completed

Continuous integration and continuous deployment (CI/CD) is a practice that’s been adopted by teams to detect errors sooner and reduce the effort to find problems. CI/CD is common in traditional software development projects and has been gaining popularity in Dynamics 365 projects.

Consider the following example scenario without CI/CD. A team works in a development environment, making changes for four weeks, and they’ve made about 50 individual changes that they’ve tracked. At the end of the four weeks, the changes were all transported to a test environment. Then, testers started testing and found a problem. The challenge is that they don’t know which of the 50 changes is causing the problem or if it’s the combination of multiple changes.

With continuous integration, after each change was completed, the change would be checked into a source repository, such as GitHub or Azure DevOps, where it would track the individual change. Continuous deployment would then deploy to test, where testing could begin. Testing more frequently with fewer changes allows easier identification of what caused a problem. On a frequency that’s been determined by the team, the same changes would be deployed to production by using the same continuous deployment process that’s used for the test environment. As in the test environment, it’s easier to identify problems in the production environment because of the smaller, more frequent deployments.

You might also work on projects with multiple development environments. In this case, you’d work in your own environment, making changes, and then the changes will be merged into a common one for integration before they’re promoted to test. If you made four weeks’ worth of changes in your environment, and a co-worker has made changes in another environment, when you merge those changes together, you’ll likely have many conflicts. By using continuous integration, you’d commit each change, and then it would merge into the integration development environment and allow early identification of conflicts and problems.

While you could manually implement a CI/CD process for your project teams, it would likely not work well because it wouldn’t be consistently implemented and performed. To effectively implement CI/CD, teams use automation tooling, such as GitHub Actions or Microsoft Azure Pipelines. This automation allows you to consistently run the automation when work is committed. These automation tools also provide more advanced options, such as enforcing approvals before deployments happen. Dynamics 365 apps that depend on Dataverse solutions for tracking changes have special automation support for GitHub and Azure DevOps by using Microsoft Power Platform Build Tools. Microsoft Power Platform Build Tools provide steps that you can use in automations to import/export and perform environment admin actions as part of CI/CD automations.