Our use of cookies

We use cookies to tailor your experience, gather analytics, and provide you with live assitance. By clicking "Accept" or continuing to browse our site you agree to the use of cookies. For more details please read our Cookie Policy.

DevOps in the world of Power Platform using GitHub Actions

by Danish Ali Detho | O365 & Power Platform Solution Architect

DevOps plays a vital role in the success of any software development project but when it comes to building low-code/no-code solutions it is often neglected or skipped due to the lack of availability of tools to implement DevOps for such solutions. Now, we all know that developing solutions on the Power Platform is fast-paced but when it comes to deploying the solution, then it can be a hectic process especially when we have multiple environments. This is where DevOps comes in and once implemented properly then it will not only speed up the deployment process but will also streamline the process for any future development as well. In this blog, we will talk about the role of DevOps in the Power platform, the options which are available, and finally, we will go through the steps to implement DevOps in the Power platform using GitHub actions.

DevOps in Power Platform

Building solutions in the Power platform is often done rapidly but deployment can be a hassle if it’s done manually.  When a process such as a deployment is difficult or risky, people naturally avoid the process by doing it infrequently or bypassing it entirely. Ending up with inconsistent environments.

DevOps in the Power platform helps in automating build and deployment tasks which helps in defining a process to make sure the deployments can be controlled by the operations and all the environments i.e. Development, Test, and Production always remain consistent.

Power Platform ALM vs Power platform ALM with DevOps

Power Platform ALM Power platform ALM with DevOps

 

Options to implement DevOps in Power Platform

Power Platform Build Tools for Azure DevOps

Azure DevOps is a (SaaS) platform from Microsoft that provides an end-to-end DevOps toolchain for developing and deploying software.  It also integrates with most leading tools on the market and is a great option for orchestrating a DevOps toolchain. Microsoft Power Platform Build Tools can be installed into your Azure DevOps organization from Azure Marketplace. The azure Service principal is used for authenticating and connecting to your Power Platform Environment. The build tools are available at no cost. However, a valid subscription to Azure DevOps is required to utilize the Build Tools.

Github Actions

GitHub Actions is a CI/CD tool for the GitHub flow. You can use it to integrate and deploy to third-party cloud application platforms as well as test, track, and manage code changes. Using Through GitHub actions, we Create workflows in the source control repository to build, test, package, release, and deploy apps; perform automation, and manage bots and other components built on Microsoft Power Platform. 2,000 action minutes/month are available for free (Personal) and 50,000 action minutes/month are available for free (Enterprise).

Power Platform DevOps End to End Process using GitHub Actions

Setup Power Platform DevOps using GitHub Actions

Lets start off by creating two environments one act as Development in which you will create or import a solution and the other act as your test/Production environment where you want to deploy the solution. Make sure both environments has Dataverse.

In the Dev Environment, create or import a solution that you will use for the deployment.

Create a new application in Azure -> Enterprise Registrations and add the API permissions to access the power platform environment.

Create a Secret and then copy the value of the secret, Application ID, and Tenant ID

Add the Azure Service Principal in both environments as App User and grant it the System Administrator role.

That’s all we need to do in the Power Platform, now switch to GitHub and create a Repo (If you don’t have one already).

In GitHub go to Repo Settings-> Actions-> Secrets and create a new secret and in the value add the client secret value from the Azure Service Principal.

Now, we need to create three flows to export the solution from Dev environment, import it to Test/Prod environment and create a release.

Export and branch Solution from Dev

Go to Actions-> New Workflow ->  Setup workflow yourself. name it “export-and-branch-solution.yml” and then copy the yml from here. Make sure to change the value to your environment where it states “#edit your values here”.

Import Solution to Test/Prod with Inputs

Follow the same process to create the next workflow and name it “release-solution-to-prod-with-inputs.yml” and then copy the yml from here.

Call to Release 

Now we will create the final flow using a similar approach and name it “release-action-call.yml and then copy the yml from here”. This flow will be triggered when a release is created and it will call the other two workflows to export the solution and then import it into the Test/Production environment. Update the parameter values with your environment URLs, solution name, and Azure App details.

You should now have three workflows.

Now go to releases and draft a new release and create a new tag for the release and a name for the release. Keep the “This is a pre-release” unchecked and publish the release.

 

This will trigger the “release-action-call” workflow which will then start off the other two flows.

Once the workflow has run successfully, you should be able to see the solution in the destination environment.

 

 

 

 

 

Latest articles

Our Favourite Picks from Power BI Global Summit 2023

17 Mar 2023

Power BI Summit is the biggest Power BI conference of the year which ran virtually from 6th March to 10th March. It brought speakers from the […]
[read article]

AxioWorks Newsletter February 2023: Development of SQList new release is in full swing

28 Feb 2023

Hello Reader, Welcome to another exciting issue of our monthly Newsletter! Each month, we try our best to bring you content that is relevant and […]
[read article]

MS List Templates bundled with Power Automate Flow

20 Feb 2023

Microsoft Lists previously known as SharePoint Lists is the go-to option for maintaining and storing data in the world of O365 and its usage has […]
[read article]

AxioWorks Newsletter January 2023: Kicking off 2023 with some great content

30 Jan 2023

Hello Reader, Welcome to another exciting issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

A pragmatic approach to obtaining value from your SharePoint data

20 Jan 2023

Organisations have been storing data in SharePoint for more than 20 years.  This data can be as simple as a List used by a small team or a complex […]
[read article]

Power BI Report Server : An On-Premises Report hosting Suite

16 Jan 2023

Power BI has become the most widely used tool for reporting due its user-friendly interface which allows business users to generate sleek and […]
[read article]

AxioWorks Newsletter December 2022: Good bye 2022, welcome 2023!

29 Dec 2022

Hello Reader, Welcome to the December issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

PowerApps Debugging and Troubleshooting made easy with Monitor

28 Dec 2022

Troubleshooting and debugging are an integral part of building and supporting a resilient app especially when it is built using a low-code […]
[read article]

AxioWorks Newsletter November 2022: Is it almost Xmas already?

29 Nov 2022

Hello Reader, Welcome to the November issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

Future of SharePoint in the world of Power Platform

29 Nov 2022

Microsoft SharePoint has been the driving force for enabling virtual team collaboration and the modern workspace revolution over the last three […]
[read article]

Get SharePoint and SQL news to your inbox

Stay up-to-date with industry news and trends, SQL and SharePoint innovations and all the latest from AxioWorks by subscribing to our monthly newsletter.

Subscribe to the AxioWorks newsletter

*