Problem Statement: Implementing CI/CD for Power Platform solutions via Azure DevOps presents challenges in managing dependencies, orchestrating deployments across environments, managing custom configurations, and ensuring comprehensive testing within a streamlined pipeline.
Solution: By leveraging the Pipelines in Power Platform, anyone can setup a healthy CI/CD pipeline for their solutions:
- Admins easily configure automated deployment pipelines in minutes rather than days or weeks
- Makers have an intuitive user experience for easily deploying their solutions
- Professional developers can (optionally) extend pipelines and run them using the Power Platform command line interface (CLI)
Brief Summary:
- Install the “Deployment Pipeline Configuration” app.
- Set up environment records in Dataverse and create a new deployment pipeline.
- Link development environments and add deployment stages.
- Deploy solutions using the pipeline and perform preflight checks.
- Check the run history of all deployments in the ‘Deployment Pipeline Configuration’ app
Steps for detailed streamlined approach:
Set up Pipelines:
- Navigate to https://admin.powerplatform.microsoft.com
- Click Dynamics 365 Apps
- Search for pipeline
- Install ‘Power Platform Pipelines’ apps in your source environment (development environment)
(You only need to install the deployment pipelines application in the host environment. You do not need to install it in other environments, such as QA or production environments that will be associated with your pipelines.)
- Navigate to https://make.powerapps.com
- Select your development environment (where you installed the application)
- Play the ‘Deployment Pipeline Configuration’ app
- On the left pane, navigate to "Environments" and click "New" to create environment records in Dataverse:
- Name: Input the name for the environment record. It's advisable to use a name like the actual environment, such as "Contoso Dev."
- Environment Type: Choose between "Development Environment" or "Target Environment." Opt for "Development Environment" for all source environments where unmanaged solutions will be developed. Select "Target Environment" for QA and production environments where managed solution artifacts will be deployed.
- Environment ID: Ensure the correct ID is selected. You can locate the environment ID for the current environment within make.powerapps.com. Click the Settings icon on the command bar, then select "Developer resources."
- Select Save
- Refresh the form, then verify Validation Status equals Success.
- Repeat step 3 until all environments that participate in the pipeline have environment records created
- Select Pipelines on the left navigation pane, and then select New to create a new deployment pipeline:
- Name: Enter a name for the pipeline, such as Contoso Standard Deployment Pipeline
- In the Linked Development Environments grid
- Click "Add Existing Development Environment"
- Link one or more development environments. (A pipeline requires at least one development environment and one stage before it can be executed)
Within the Deployment Stages grid, select New Deployment Stage, to display the quick create pane
- Enter the details for each stage, and then select Save and Close:
- Name: The name of the stage.
- Deployment Stage. For the first stage, or pipelines containing only one stage, this stage should be left blank.
- Target Deployment Environment: This is the target environment where this stage deploys to.
- Repeat the previous two steps for each stage you would like to add to the pipeline. You must have at least one stage
Run Pipelines:
- To deploy a solution using a pipeline, go to Solutions and select an unmanaged solution to deploy
- From the Solutions area,
- Select Pipelines from the left navigation pane
- Select the stage to deploy to, such as Deploy to Test, select Deploy here, and the deployment pane appears on the right
Choose deploy Now or schedule for Later, and then select Next on the right pane. This initiates validation of the solution against the test environment. This validation can also be referred to as preflight checks. Missing dependencies and other common issues are checked that might cause a deployment to fail
Select Deploy. This initiates an automated deployment to the target environment
- You can navigate back to ‘Deployment Pipeline configuration’ app and check the run history of all deployments