{"id":829,"date":"2024-03-26T01:08:00","date_gmt":"2024-03-26T01:08:00","guid":{"rendered":"https:\/\/automatethemundane.com\/index.php\/2024\/03\/26\/power-pipelines-and-enhanced-alm-part-5-controlling-pushes-to-production\/"},"modified":"2024-03-26T01:08:00","modified_gmt":"2024-03-26T01:08:00","slug":"power-pipelines-and-enhanced-alm-part-5-controlling-pushes-to-production","status":"publish","type":"post","link":"https:\/\/automatethemundane.com\/index.php\/2024\/03\/26\/power-pipelines-and-enhanced-alm-part-5-controlling-pushes-to-production\/","title":{"rendered":"Power Pipelines and Enhanced ALM Part 5 &#8211; Controlling Pushes to Production"},"content":{"rendered":"\n<p class=\"has-text-color\" style=\"color: rgb(0, 0, 0)\">We are going to skip ahead in our diagram to the Develop Solution Step. We are not going to go over the entire step. But I believe this is a good time to go over controlling how solutions are pushed to Test and Production and when they are and are not allowed. <\/p>\n\n\n<p class=\"has-text-color\" style=\"color: rgb(0, 0, 0)\">If you are following this series, the first step will be to push the solution using the pipeline into Production. Create an entry for this solution then verify the entry in the Projects table. This should be the only time we have to do this. If you are simply installing the solution in your production environment, then you can skip the verification step. <\/p>\n\n\n<h2 class=\"wp-block-heading\">Verification step. <\/h2>\n\n\n<ol class=\"wp-block-list\">\n<li>With the solution in production create a new request called \u201cPlatform Project Management\u201d<\/li>\n\n\n\n<li>The Flow will fail because a solution with that name already exists\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-84-1024x382.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>We need to manually add the Solution Name from Dev into the table<\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-85-1024x192.png\" alt=\"\"\/><\/figure>\n\n\n<h2 class=\"wp-block-heading\">Orchestrator Build Out<\/h2>\n\n\n<ol class=\"wp-block-list\">\n<li>Within the Pipeline Deployment Pipeline Configuration App Navigate to the Deploy to Production Deployment Stage<\/li>\n\n\n\n<li>Toggle the Pre-Deployment Step Required to true<\/li>\n\n\n\n<li>Save and close the stage\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-86.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Within the Orchestrator Environment create a new solution called Pipeline Management\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-87.png\" alt=\"\"\/><\/figure>\n<\/li>\n<\/ol>\n\n\n<h2 class=\"wp-block-heading\">Environment  Variable<\/h2>\n\n\n<ol class=\"wp-block-list\">\n<li>Create an Environment variable called Production Pipeline Environment<\/li>\n\n\n\n<li>Set the Current Environment to Production<\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-88.png\" alt=\"\"\/><\/figure>\n\n\n<h2 class=\"wp-block-heading\">Flow Build <\/h2>\n\n\n<ol class=\"wp-block-list\">\n<li>Create a new flow called 1.1 - When a request to push to production is made\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-89.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Set the trigger to Dataverse, When an action is preformed \n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-90.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Create three string variables. varLeadsEmail, varCustomerEmail, and varTargetEnvName\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-91.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Create a Scope called \u201cScope - Deployment Information\u201d\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-92.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Add two Dataverse Get row by ID actions and configure them as follows and one Dataverse List Rows\n<ol class=\"wp-block-list\">\n<li>Table Name - Deployment Stage Runs<\/li>\n\n\n<li>Row ID - StageRunId\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-93.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n<li>Table Name - Users<\/li>\n\n\n<li>Row ID - Created By (value)\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-94.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n<li>Table Name - Deployment Environments<\/li>\n\n\n<li>Filter the rows by the Target Environment ID\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-95.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n<li>Set the vartargetEnvName using \n<pre class=\"wp-block-code\"><code>outputs(&#039;List_rows_-_Deployment_Environment_&#039;)?[&#039;body&#039;]?[&#039;value&#039;][0]?[&#039;name&#039;]<\/code><\/pre>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Create a Scope called Scope - Get Solution Info\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-96-1024x294.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Add a Dataverse List rows from selected enviorment\n<ol class=\"wp-block-list\">\n<li>Set the Enviorment to the variable set above<\/li>\n\n\n<li>Set the table name to Power Platform Projects<\/li>\n\n\n<li>Filter the rows by the solutionid using the Artifact Name<\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-97.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Add a Scope called Leads info<\/li>\n\n\n\n<li>Add a Dataverse get row by id from selected environment \n<ol class=\"wp-block-list\">\n<li>Set the Environment to the Environment set above<\/li>\n\n\n<li>Set the table name to Entra ID<\/li>\n\n\n<li>Set the Row ID to Project Leads GUID\n<pre class=\"wp-block-code\"><code>outputs(&#039;List_rows_from_selected_environment_-_Production_Power_Platform_Projects&#039;)?[&#039;body&#039;]?[&#039;value&#039;][0]?[&#039;_andy_projectlead_value&#039;]<\/code><\/pre>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Set the var varLeadsEmail to the Mail of the Lead\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-98.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Add a parallel branch action then add a scope, call it Customer Info<\/li>\n\n\n\n<li>Add a Dataverse Get Row by ID from selected environment action\n<ol class=\"wp-block-list\">\n<li>Set the Environment to the Environment variable set above<\/li>\n\n\n<li>Set the table to Contacts<\/li>\n\n\n<li>Set the row ID to \n<pre class=\"wp-block-code\"><code>outputs(&#039;List_rows_from_selected_environment_-_Production_Power_Platform_Projects&#039;)?[&#039;body&#039;]?[&#039;value&#039;][0]?[&#039;_andy_projectcustomer_value&#039;]<\/code><\/pre>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Set the variable varCustomerEmail to the email of the customer\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-99.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Create a Scope Called Approval Start\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-100.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Inside that Scope add another Scope Called Approval Creation\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-101.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Create a Start and wait for an approval action and format is as follows\n<ol class=\"wp-block-list\">\n<li>The name of the solution is \n<pre class=\"wp-block-code\"><code>outputs(&#039;List_rows_from_selected_environment_-_Production_Power_Platform_Projects&#039;)?[&#039;body&#039;]?[&#039;value&#039;][0]?[&#039;andy_projectname&#039;]<\/code><\/pre>\n<\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-102.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Add a Condition based on the outcome of the Approval. Set the is equal to \u201cApprove\u201d\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-103-1024x377.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>For the If yes path add a preform an unbound action and update it as so<\/li>\n\n\n\n<li>Set the StageRunID to the StageRunID within the trigger\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-104.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>For the if No path add a preform an unbound action and update it as so\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-105.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Add a send email action \n<ol class=\"wp-block-list\">\n<li>Set the To to the primary email of the submitter<\/li>\n\n\n<li>Set the subject and body as follows\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-110.png\" alt=\"\"\/><\/figure>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Under the Scope - Get Solution Info add a parallel path and add a scope. \n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-107-1024x243.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Update the Scope so that it will only run if the above action has failed\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-108.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Add a send email action\n<ol class=\"wp-block-list\">\n<li>Set the To to the primary email of the submitter<\/li>\n\n\n<li>Set the subject and body as follows<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/untitled-111.png\" alt=\"\"\/><\/figure>\n\n\n<h2 class=\"wp-block-heading\">Testing<\/h2>\n\n\n<p class=\"has-text-color\" style=\"color: rgb(0, 0, 0)\">To test this out we will do two things. First we will create a solution to Development and try to push it into production. When we push it, it will fail and send us an email stating we need to add it to the register. Secondly we will add a project to the PPM app in production, let it create the solution in dev, then push it all the way to production. It will send the request to the lead and if approved push it to production. <\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>We are going to skip ahead in our diagram to the Develop Solution Step. We are not going to go over the entire step. But I believe this is a good time to go over controlling how solutions are pushed to Test and Production and when they are and are not allowed. If you are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":825,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,43,23,6,42,35],"tags":[25,4,5,29,41],"class_list":["post-829","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dataverse","category-environments","category-forms","category-model-driven-app","category-power-pipelines","category-tables","tag-dataverse","tag-mda","tag-power-apps","tag-power-automate","tag-power-pipelines","entry","has-media"],"jetpack_featured_media_url":"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/03\/photo-1592438944517-ee7d4fd058c9-scaled.jpg","_links":{"self":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/comments?post=829"}],"version-history":[{"count":0,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/829\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media\/825"}],"wp:attachment":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media?parent=829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/categories?post=829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/tags?post=829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}