CRM Crate

Approve the deployment of solutions using Pipelines in the Power Platform

We will learn how to approve solution deployments using Pipelines in the Power Platform. Before we start, make sure to subscribe to CRM Crate so that you can stay up to date in the field of Power Platform.

Approve the deployment of solutions using Pipelines in the Power Platform

Pipelines within the Power Platform are designed to make application lifecycle management (ALM) more accessible for Power Platform and Dynamics 365 customers. They achieve this by integrating ALM automation and enabling continuous integration and continuous delivery (CI/CD) capabilities within the service, making it more user-friendly for all creators, administrators, and developers.

Pipelines notably decrease the level of effort and specialized knowledge that was previously needed to achieve a return on investment (ROI) when implementing effective, automated ALM practices within your team or organization.
Below are few key benefits of deploying your solutions through Power Platform Pipelines.

  1. Experienced developers have the choice to expand pipelines and execute them through the Power Platform command line interface (CLI).
  2. System Administrators can swiftly set up automated deployment pipelines within a matter of minutes, as opposed to the lengthier timeframe of days or weeks.
  3. Application makers enjoy a user-friendly experience that makes deploying their solutions a straightforward process.
  4. Pipelines greatly enhance the productivity of makers, developers, and administrators. They expedite the delivery of your business solutions with improved quality, all while ensuring a secure and well-regulated process.
  5. Pipelines save time by taking care of the complex tasks and ongoing maintenance, relieving you from those responsibilities.


How to approve / reject the deployment of solutions using Pipelines?

In a real-life scenario, we require an approver who is supposed to approve the deployment in higher environments, such as UAT and Production. The solution provided below will meet this requirement.

Step 1: Enable ‘Pre-Deployment Step Required’ setting in pipeline.

  1. Within your host application, open the ‘Deployment Pipeline Configuration’ app and navigate to Pipelines.
  2. Navigate to the ‘Deployment Stage’ sub-grid and open your existing deployment stage.
  3. Search for the property ‘Pre-Deployment Step Required’ and turn is ON.
    This property provides additional flexibility to insert a custom step after a deployment is approved. For example, if a final approval is required before deploying the solutions via pipelines.
Approve the deployment of solutions using Pipelines in the Power Platform

Pre-deployment step required

1. Step starter trigger – OnPreDeploymentStarted
2. Step completed trigger – OnPreDeploymentCompleted
3. Unbound action name – UpdatePreDeploymentStepStatus
4. Approval Status – 20 = completed, 30 = rejected

Step 2: Build a Power Automate flow in Dataverse

We will need a asynchronous process to track the pipeline deployment starting point and then further create an approval process to continue the deployment. We will achieve this requirement with help of Power Automate flow as given below.

  1. Login to Power Automate portal (https://make.powerautomate.com/) with valid maker role.
  2. Create a new Automate Cloud Flow with Dataverse trigger ‘When an action is performed’ and configure it as given below.
    Catalog: Microsoft Dataverse Common
    Category: Power Platform Pipelines
    Table Name: (none)
    Action Name: OnPreDeploymentStarted
  3. Now we want to create a approval process to approve or reject the triggered deployment pipeline. Add an action named ‘Start and wait for an approval’ to your flow step.
    Configure your approval action as per your requirements.
  4. Further, add a new conditional branch action to your flow where you need to check the outcome of the previously defined approval process.
  5. If the condition is True (Approval Process Outcome = ‘Approve’), then call an unbound action named ‘UpdatePreDeploymentStepStatus’ and configure it as given below.
    PreDeploymentStepStatus: 20 (20 signifies approved)
    StageRunID: Guid of pipeline stage ID which triggered the flow
  6. Save the flow once the configurations are completed.
Approve the deployment of solutions using Pipelines in the Power Platform
Approve the deployment of solutions using Pipelines in the Power Platform

Step 3: Test automated deployments using Pipelines.

Follow the below steps to test your new approval based automated deployments using Power Platform pipelines.

  1. Log in to a Power Platform environment through Power Apps (make.powerapps.com) or Power Automate (make.powerautomate.com) and choose your development environment.
  2. To utilize a pipeline for deploying a solution, navigate to the Solutions section and either create a new unmanaged solution or select an existing one for deployment.
  3. Within the Solutions section, select one of the two provided options to incorporate the solution into the pipeline, as described below.
    a. Select Pipelines from the left navigation pane.
    b. Select Overview from the left navigation pane, and then select Deploy on the command bar.
  4. Choose the deployment target stage, such as “Deploy to Test,” then click “Deploy here.” This action will trigger the deployment pane to appear on the right.
  5. Opt-in for immediate deployment by selecting ‘Deploy Now’ or set a later schedule by selecting ‘Schedule for later’, then click on “Next” in the right-hand panel. This action triggers the validation of the solution against the test environment, a process commonly known as preflight checks. During this validation, the system examines for missing dependencies and other typical issues that could potentially lead to a deployment failure.
  6. Review the summary of your deployment and optionally add deployment notes for future reference purpose.
  7. Click on”Deploy.” This action triggers an automated deployment to the designated target environment.
  8. Now once you click ‘Deploy’, the Power Automate flow will be triggered and a new approval process will be created for your system administrator (As per your flow’s configuration). Once the approver approves the process, the pipeline will start the deployment.
Approve the deployment of solutions using Pipelines in the Power Platform

Overall, approving deployment with pipelines in the Power Platform signifies a commitment to agility, reliability, and scalability in application development. It is a pivotal step towards fostering a culture of continuous improvement and innovation within the organization, ensuring that the Power Platform is harnessed to its full potential for driving business success.


5 1 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
error: CRM Crate Security Engine - Disabled Right Click & Selection!

Congratulations!

Well Done,
Welcome to CRM Crate

Stay tuned with us and get all latest updates and learning in Microsoft CRM and related techonologes.