Power Community

Power Community

Pre-Export Step Required setting in Deployment Pipeline | Power Platform Pipelines

https://dynamicscrmclub.files.wordpress.com/2024/03/requestpending-3.png

Now that you must’ve already setup your basic Power Platform Pipeline as yet and are looking to explore how to extend the Power Platform Pipeline to do more advanced operations, this post is for you!
In case you are still looking to first setup your Power Platform Pipeline, you can check this Blog Series which this very post too, is a part of – Power Platform Pipelines | Blog Series

What is Pre-Export Step Required Setting?

This is the ability to have a trigger before an Export operation from the Development Environment is initiated in order to run the pipeline – only available for the first stage in the pipeline.

This is provided so that you may want to run some external operations before this is taken through the pipeline for deployment.

Use Case is – that you want to first seek an approval from the Admin before the Solution is deployed to Production (or rather, sent through the pipeline for deployment). Once approved, the pipeline should automatically proceed towards executing the rest of the deployment stages.

Pre-Export Step Required

While setting up your Pipeline, in case you were wondering what Pre-Export Step Required setting was, see below –

  1. Once you mark this field as checked/Required, save the record and it’ll appear like this on the record.
  2. What this does is, it runs the trigger action ‘OnDeploymentRequested’
  3. And once this Flow is trigger based on this Action, you can perform custom logic to be carried out and be successful before the deployment is carried forward.
    In this example, I’m setting a simple Approval process to be in place so that the Admin is aware and approves all the Deployment requests.
  4. Now, once an Approval is received, you need to check the status of the request and if it’s Approved, you need to run Perform an unbound action to initiate the Action ‘UpdatePreExportStepStatus
    You’ll need to pass the StageRunId – You’ll get this in the Dynamics Content Properties of the Flow itself from the trigger.
    Then, you need to set the Status of 20 – this means Approved.
    For rejection, the status to set is 30.
  5. Now, once this Flow is in place, every time a Pipeline is Run to deploy the solution, it’ll first wait for the Approval process to complete and the pipeline itself will show the below message.
  6. This status can also be seen in the Deployment Stages in the ‘Deployment Pipeline Configuration‘ app as well.
  7. Now, the Admin on the other hand, will receive a Power Automate Approval like this (based on whatever you have configured). This is received on both Approvals in Teams and in Power Automate as well.
  8. Once the Approver approves, I’ll enter some notes while approving.
  9. The pipeline will then proceed to deploy to production.
  10. And this will also proceed on the UI in Pipelines as well.
  11. Once deployed, you’ll see that this is completed Successfully if there are no issues.
  12. You can also see the History. The End Time will represent when it was completed as opposed to Start Time representing when the Deployment Request was initiated.
  13. And also in the ‘Deployment Pipeline Configuration‘ app.

Here’s official Microsoft documentation on how you have Gated Extensions like these to be in place in Power Platform Pipelines – https://learn.microsoft.com/en-us/power-platform/alm/extend-pipelines#gated-extensions-available?WT.mc_id=DX-MVP-5003911

Hope this was useful!

Thank you!

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Unpacking the VMware Rapid Migration Plan

Allie Wolf Allie is the Marketing Manager at Dynamic Consultants Group. She graduated from Northwest Missouri State University with...

More Articles Like This

- Advertisement -spot_img