You are currently viewing Power Platform and DevOps-Deploy solutions between environments

Power Platform and DevOps-Deploy solutions between environments

In this article, we will Explain The integration between the power platform and DevOps and learn how to automatically move Solutions between environments and deploy it using a continuous delivery approach with the assistance of Azure DevOps.

Power Platform ALM

Before going deeply with the Power Platform and DevOps lest know the Application lifecycle management ALM with the Power Platform.

What is ALM?

ALM is the lifecycle management of applications which easily helps to make project management, from requirements to deployment and it includes three areas,

  • Governance include requirements management, resource management, data security, user access, change tracking, review, audit, deployment control, and rollback,
  • Development identifying current problems, and planning, design, building, and testing the application,
  • Maintenance includes deployment of the app and maintenance of optional and dependent technologies.

ALM with Power Platform

In the Power platform, there are some environment types that are used in the ALM, such as the Sandbox environment, Production environment, Community environment, and the Default environment.

Environment is the container that store your data, apps and bussiness processes.

You can check this article to know about the environment and its type in The Power Platform

An environment serves as a container to separate apps that may have different roles, security requirements, or target audiences. So having multiple development environments such as development, testing, and productions, with multiple developers collaborating in the same environment, and maybe working on the same application and sharing source code that will make it difficult to know where is the latest customizations and latest version, so it is important to implement an ALM specially For team development, it’s a good practice to use tooling or processes to achieve developer isolation. that is Why it is important to add the Power platform assets such as Flows, Files, Power Apps apps, etc to DevOps.

Solutions are the mechanism for implementing ALM in Power Apps and Power Automate.

Power Platform and DevOps

Power Platform and DevOps

Azure DevOps offers developer services that enable teams to plan their work, collaborate on code development, and build and deploy applications.

The goal of using DevOps with Power Platform is to avoid conflict when making changes to shared code.

How to deploy Power platform solution to DevOps?

You can manually export Power Platform solutions from one environment and import them to another environment. Now we can deploy a Power Platform Solution by using Azure DevOps Pipeline automatically and you can also use Microsoft Power Platform Build Tools to automate common build and deployment tasks related to apps built on Microsoft Power Platform.

  • Deployment is one of the most important parts of the development lifecycle.
  • Having an automated deployment process will increase the value of your team and any one can do the deployment and saves time by being faster and more efficient.

In this Deployment we will use Microsoft Power Platform Build Tools for Azure DevOps.

Microsoft Power Platform Build Tools for Azure DevOps, we use Microsoft Power Platform Build Tools to automate common build and deployment tasks related to apps built on Microsoft Power Platform.

Deploy a Power Platform Solution by using Azure DevOps Pipeline

  1. Open the Azure DevOps URL, If you haven’t created an organization yet, create one
  2. If you don’t have a DevOps project create new one
  3. Navigate to the the Pipeline section,>>Releases>> we will create new Releases pipeline
    Azure Pipeline is a cloud service that we can use to build and test our code project automatically to make them available to others.
Azure Pipeline
  1. Choose Empty job
release | Power Platform Geeks

After create new job, you will see only one job by default and no task

re2 | Power Platform Geeks
  1. Define the tasks by clicking the ‘task’ word.
  2. Click on the + icon and search for the Power Platform Build tool
re3 | Power Platform Geeks

If it is the first time to use the Power Platform Build tools you can click Get it free and follow the steps to download to your organization.

re5 | Power Platform Geeks

If you Installed It before you will find as shown in the bellow image

re7 | Power Platform Geeks
  1. Choose Power Platform Export solution and click Add and then click to Configure the Export solution Task
re8 | Power Platform Geeks

as you see some have red messages below and they need to be configured.

re10 | Power Platform Geeks

If you don’t have Service Connection >> click Manage to Create your first service connection, or from Project settings > Service connections > New service connection > choose the connection type you need, for More details you can check this article

Back to Power Platform Export Solution>>

  • Choose the Service Connection ” The target environment that you want to export the solution from”
  • In The solution Name $(SolutionName)
  • In the solution Output File $(SolutionName).zip
  1. Add the Power Platform Import solution as we did in step 6
  • Choose the Service Connection ” The target environment you want to import the solution to”
  • In the solution Output File $(SolutionName).zip
  1. Add the Power Platform Publisher Customization as we did in step 6
  • Choose the Service Connection ” The target environment”
impor | Power Platform Geeks
  1. Save the release pipeline > click on the save button on the top
  2. Create a new release
dep1 | Power Platform Geeks
  1. Deploy and you will find that the deploy is in progress
depppp 2 | Power Platform Geeks

After a successful release, you will find your solution Deployed into target environment.

Conclusion

  • A deployment job is a collection of steps that are run sequentially against the environment.
  • Using Azure Pipeline is simple, you can set up a basic build and release/deployment in some minutes
  • In this post we learned how to use Azure DevOps to move the solutions between the Power Platform environments and how to deploy power platform solution to devops.

SeeAlso

Heba Kamal

Microsoft MVP, MCT, Technical Speaker, Blogger, and Microsoft 365 and Power Platform Consultant.