Using Pipelines in Power platform for deploying solutions to environments.

Hello Guys,

In our previous blog we have seen how to use changesets in PA flow for atomic transactions. Today we will see how we can use Power Platform pipeline for deploying solutions.
















Do follow us to know more about Dynamics and Power Platform. 
Also if you like our blog then please comment and share this blog with your friends.

AS a CRM Developer, we need to create and manage solutions for various environment. Once development is done on Dev environment, we are moving the CRM changes by packaging into the solution to next environment like UAT and Production.

Previously we were doing the solution movement manually but nowadays we have CICD pipeline in Azure. Now Microsoft has introduced pipelines in Power Platform too. So today we will be exploring the same Pipeline and will see how to deploy solutions in various environment using Power Platform Pipeline. 




As you can see in above image, we have three environments like Dev, UAT and Prod. We will be doing some customization on Dev environment and will move the customization from Dev to UAT and then Prod.




We have created one solution named blogger which contains one custom entity named Stack Holders. We will be moving this entity on UAT environment using Pipe Line. Let's see how to do that.

1. Creating Host Environment : To manage pipe lines we need to create one Host environment which contains all the details regarding deployment.




As you can see, we have one host environment. Now we install one solution to this environment. Open the environment and click on Resources -> Dynamics 365 apps.




Now click on Install apps and select Power platform pipelines.




Click on Next and Install. Once installation will be done, we can use the app for configuring the pipeline. 




Now open the Host environment and click on Deployment Pipeline configuration app as shown above.




First we will be creating Environment. Click on New and configure it as shown below:




Same way we will be creating UAT and Prod. Make Sure you select Target in Type while creating UAT and Prod.





Now we will be creating Pipe line. Click on Pipelines and click on New and configure it as shown below:




Now you can see one grid below which is Linked Development Environments. Click on Add Existing Development environment and Select Dev Environment as shown below:




Now you can see one more grid which is Development Stages. Click on New Development Stage and configure it as shown below:




Here you can see, previous deployment stage is blank. It is just because we are deploying from Dev to UAT using this stage.  Now we will be adding one more stage as shown below:




Here you can see, previous stage information is given which means first Dev to UAT and then Prod deployment.

So our Pipeline is ready. Now we will be granting security roles to user who will run this pipeline.

When we install the Power Platform pipelines application, two Security roles are being added.

1. Deployment Pipeline User: It has privileges to run pipelines that have been shared with them.
2. Deployment Pipeline Admin: it has full control over all pipeline configuration, without needing system administrator security role membership.

Now go to Host environment -> Settings -> Users -> click on Add user -> select user -> add user and select Security Role -> Save.





Once Security Role is given, Go the Pipeline records, select the record and click on share button.




So now user is able to run the pipeline. 

Now go to the dev environment. and open the solution to deploy.




Click on Pipeline. This will navigate to pipeline window as shown below:




Now we will be deploying our solution to UAT so click on Deploy Here in Deploy in UAT section.






So our solution is deployed to UAT. Keep in a mind that solution which will be deployed to Target will be, deployed as managed solution only. In the same manner you can deploy the solution to Prod also.

You can verify the components in Target environment as shown below:





You can Run history for pipeline run status.




You can also check Solution Artifacts as shown below:





Hope it helps...
 

Comments

Popular posts from this blog

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Understanding Sales Process in D365.