Skip to main content

Power Platform Deployment Pipeline - reading blog

 https://www.matthewdevaney.com/the-complete-power-platform-pipelines-alm-setup-guide/


https://www.matthewdevaney.com/the-complete-power-platform-pipelines-alm-setup-guide/create-power-platform-environments-for-dev-test-prod/

Create an Environement from PP admin center

For Dev env add suffix xyz(Dev) for understanding purpose

choose type as Sandbox for development env

add dataverse to store data(Yes)

Setup for Test and Prod as well. Make sure enable it as managed environment.

Test and production environments are known as target environments. All target environments are required to be managed environments to use Power Platform Pipelines.

Test env type should be sandbox

Prod env type should be production

-----------------------------
https://www.matthewdevaney.com/the-complete-power-platform-pipelines-alm-setup-guide/install-power-platform-pipelines-in-the-host-environment/

Install Power Platform Pipelines In The Host Environment

The Power Platform Pipelines application allows a user to create and manage pipelines. It must be installed in a host environment. A host environment is simply a production environment where the pipeline definitions are stored. And where the pipelines themselves are executed.

Open The Environments Menu In Power Platform Admin Center

To create a host environment for the Power Platform Pipelines application go to the Power Platform Admin Center. Then open the Environments menu by selecting the option Mange > Environment and press the New button.

Configure The Power Platform Pipelines Host Environment

In the New Environment menu choose the following setup options:

  • Name – PP Pipelines Host
  • Type – select Production
  • Add a Dataverse datastore – Yes
Then on the Add Dataverse menu choose a URL. A common URL pattern is companyname-pipelines-host. In the example below, the URL is devaney-pipelines-host. Press the Save button once setup is finished.

Install The Power Platform Pipelines App

Now that the host environment is setup the Power Platform Pipelines application must be installed. In the Power Platform Admin Center go to Manage > Dynamics 365 Apps. Choose Power Platform Pipelines and select Install.

Choose the Power Platform Pipelines host environment and press the Install button.

In the PP PipelinesHost, pipleline evn we can see it is installing.

Verify The Model-Driven App Installation In The Host Environment

After a few minutes the Power Platform Pipelines installation will complete.

Go to the Power Platform Pipelines Host environment and look for a model-driven app named Deployment Pipelines Configuration. This is the application used to create and manage pipelines.

------------------

Import The Sample Solution Into The Dev Environment >>

https://www.matthewdevaney.com/the-complete-power-platform-pipelines-alm-setup-guide/import-the-sample-solution-into-the-dev-environment/

This Power Platform Pipelines tutorial uses a sample solution with a canvas app, a model driven app, a flow, connections references, environment variables and tables. Rather than build them from scratch, we will import them into the development environment. That way we can keep focused on learning Power Platform application lifecycle management.

Download the Currency Exchange Sample solution from github

Import The Solution Into the Development Environment

Open the Development environment in Power Apps and go to the Solutions menu. Press the Import solution button.

Env name left corener is ALM Tutorial (Dev)

Configure The Connection References

The sample solution contains two connection references used in a Power Automate flow. One for Dataverse and another for Outlook. Wait for the green checkmark to appear beside each connection reference. If it does not appear, press the three dots to troubleshoot the issue. Then press the Next button.

Set The Environment Variable Value

The sample solution also contains an environment variable for Email Notifications. The email address in this environment variable will receive email. Set this value to your personal email then press Import.

The sample solution will begin importing.
After a few minutes the import process will complete.

Review The Sample Solution In The Development Environment

Open up the sample solution in the development environment and get to know its components.

Note that the environment variable is set to the value we defined during the import process.

And the connection references for Dataverse and Outlook have been configured with a connection.

To see the connections used in the connection references go to the Connections menu.

-----------------------------------

Setup A Power Platform Service Account >>

A Power Platform Service Account is a Microsoft 365 account used by the system to perform background operations. Service Accounts often have an elevated security role like System Administrator. By using a Service Account, Power Platform Pipelines can deploy solutions as the service account instead of the user who started the deployment. This avoids giving the user system administrator privileges to the target environment

Add A New User In The Microsoft 365 Admin Center

To create a Power Platform Service Account go to the Microsoft 365 Admin Center. Then browse to Users > Active Users and press the Add A User button.

Set the first name and last name to Service Account. And choose a username such as powerplatformserviceaccount@domain.com. Then press the Next button.

Assign Power Apps And Power Automate Licenses

The Power Platform Service Account must have premium licenses assigned to it. Apply a Power Apps Premium license and a Power Automate license. Then press Next.

Grant The System Administrator Role

The Power Platform Service Account must be given a System Administrator role in all environments: Development, Test, Production and the Pipelines Host environment. For each environment, go-to the landing page and open the Users menu.

Add the Power Platform Service Account as a new user.

Assign the System Administrator role to the Service Account.

------------------------------------------------

Start A New Azure DevOps Project >>

An Azure DevOps project must be setup to take advantage of Power Platform Git Integration. Then we can add an Azure Repo to the DevOps project to store code in Git. An Azure DevOps license is free for the first 5 users in an organization and only takes a few minutes to setup.

Create A New Azure DevOps Organization

Azure DevOps can be accessed through the Azure Portal. Open the Azure Portal and search for Azure DevOps organizations.

An Azure DevOps organization is needed to create Azure DevOps projects. Press the My Azure Dev Ops Organizations page.

Press the Create new organization button or select an existing organization.

If starting a new organization, select a URL and a host country. Then press Continue.

Setup An Azure DevOps Project

On the Azure DevOps home page, select your organization once again, and fill-in the create a project menu. Choose the name ALM Tutorial Project. Set visibility to Private and version control to Git. Then press the Create project button.

The new project will appear inside the selected organization. Open the project.

he project landing screen appears with a welcome message.

------------------------------------------------

Configure Development And Target Environments >>

https://www.matthewdevaney.com/the-complete-power-platform-pipelines-alm-setup-guide/create-a-power-platform-pipeline/

Power Platform Pipelines must be connected to a development environment and one or more target environments. A development environment is where makers develop solutions. Target environments are where solutions get deployed to. For example, the test and production environments. Before creating the pipeline we will add environments to the pipeline configuration app.

From the PP Pipelines Host environment,
Under ->Apps 

Click on our app "Deployment Pipeline App"


Open The Deployment Pipeline Configuration App

Go to the Power Platform Pipelines host environment and open the Deployment Pipelines Configuration app.

Add The Development Environment To The Pipelines App

First, we will add a development environment. Go to the Environments page and press the New button.

Fill-in the environment details then press the save button. The validation status will switch to pending.

  • Name – ALM Tutorial (Dev)
  • Owner – set to your own user account
  • Environment Type – Development Environment
  • Environment ID – the environment ID from the environment’s developer resources menu.
After a few moments pass press the refresh button. The validation status will be updated to success.

Get The Environment ID From Developer Resources

The environment id is necessary to setup the developer and target environments in Power Platform Pipelines. Go to any environment, press the settings button and select developer resources.

The unique identifier of the environment is shown as Environment ID.

Setup The Test Environment As A Target Environment

Continue on with adding the Test Environment as a target environment. Target environments are environments where managed solutions are deployed to.

Add the environment details then press the save button. Wait for the environment to pass validation.

  • Name – ALM Tutorial (Test)
  • Owner – set to your own user account
  • Environment Type – Target Environment
  • Environment ID – the environment ID from the environment’s developer resources menu.

Configure The Prod Environment As A Target Environment

Add a new environment one more time. Supply the Production environment details then press the save button. Wait for the environment to pass validation.

  • Name – ALM Tutorial (Prod)
  • Owner – set to your own user account
  • Environment Type – Target Environment
  • Environment ID – the environment ID from the environment’s developer resources menu.
All environments have now been added to the Deployment Pipeline Configuration app. The Developer environment is included as development environment. And the Test & Production environments are target environments.
--------------------------------------------------
Power Platform Pipelines move solutions from a development environment to a target environment such as the test environment or the production environment. They ensure deployments to the correct environment are performed in a consistent manner. Configuration of components such as connection references and environment variables can be controlled through deployment settings. And a copy of the solution is stored for easy redeployment if needed.

Create A New Power Platform Pipeline

Go to the pipelines host environment and open the deployment pipeline configuration model-driven app.

Browse to the pipelines page and create a new pipeline.

Name the pipeline ALM Tutorial Pipeline. Allow redeployments of older versions. Then save the pipeline.

We want the pipeline to export solutions form the development environment and import them into the test and production environments. Add an existing development environment to the pipeline.

Select the ALM Tutorial (Dev) development environment to the pipeline. We created this record in a previous module of the tutorial.

The ALM Tutorial (Dev) environment now appears in the linked development environments subgrid.

Add A Test Environment Deployment Stage To The Pipeline

The test environment is the first target environment we will add to the Power Platform pipeline. Look for the deployment stages subgrid and press the new deployment stage button.

Setup the test environment deployment stage as follows. Then save and close the stage.

  • Name – ALM Tutorial Deployment Stage (Test)
  • Owner – your Microsoft 365 account
  • Deployment Pipeline – ALM Tutorial Pipeline
  • Target Deployment Environment ID – ALM Tutorial (Test)
The test environment deployment stage appears in the subgrid.
The production environment appears in the deployment stages subgrid.

------------------------------------------------
https://www.matthewdevaney.com/the-complete-power-platform-pipelines-alm-setup-guide/assign-power-platform-pipelines-security-roles/

Power Platform Pipelines security role is required to create or use Power Platform pipelines if you are not the system administrator. We can assign a user to the deployment pipeline administrators role or the deployment pipeline users role indirectly through security teams. Security teams are found in the pipelines model-driven app.

Open The Pipelines Model-Driven App

Go to the pipelines host environment and open the deployment pipeline configuration model-driven app.

Assign A User To The Deployment Pipeline Administrator Role

The deployment pipeline administrator role gives users access to the deployment pipeline configuration app and the ability to create & edit pipelines in the host environment. To assign a new pipelines administrator, open the security teams page and select deployment pipeline administrators.

Press the add existing user button in the Team members subgrid.

Choose the user you want to become a Power Platform pipelines administrator. Then press the Add button.

The user appears in the team members subgrid.

Add Users To The Deployment Pipeline Users Role

The deployment pipeline user role gives the user an ability to run a pipeline that is shared with them. To add a new pipelines user, go to the security teams page and select deployment pipeline users

----------------------------------------------

Deploy A Solution To The Test Environment >>

https://www.matthewdevaney.com/the-complete-power-platform-pipelines-alm-setup-guide/deploy-a-solution-to-the-test-environment/

After creating a Power Platform Pipeline, we can use it to import a solution from the development environment into the test environment, before pushing it to production. The test environment allows us to perform quality tests on the solution and validate the deployment while not blocking development. It is recommended to check solutions into git-based source control before moving them into test.

Deploy The Solution To The Test Environment With Pipelines

Go to the development environment and open the solution you want to move to the test environment.

Select the pipelines menu item from the left navigation.

On the Pipelines page, select the ALM Tutorial Pipeline. Then press the Deploy here button.

Choose to deploy the solution now, then press the Next button.

Configure Connection References And Environment Variables

The sample solution contains two connection references used in a Power Automate flow. One for Dataverse and another for Outlook. Wait for the green checkmark to appear beside each connection reference. If it does not appear, press the three dots to troubleshoot the issue. Then press the Next button.

The sample solution also contains an environment variable for Email Notifications. The email address in this environment variable will receive email. Set this value to the tester’s email address then press Next.

Write Deployment Notes To Explain Solution Updates

Each deployment will update a the solution in the target environment. To make it easier to track changes it is important to write good deployment notes. Explain the difference between each deployment as opposed to giving an overview of the entire solution. Do not use AI generated deployment notes.

Press the deploy button once finished.

Wait For The Test Stage Deployment To Complete

Power Platform Pipelines will begin to the deploy the solution to the test environment. This operation takes a few minutes to complete.

When the deployment successfully completes the last installed version and the deployment date appear in the test stage.

Review The Deployment To The Test Environment

Go to the test environment and open the solutions menu to check on the deployment of the sample solution. Look under the managed solutions tab.

It is recommended to verify the deployment by opening applications and automations to ensure they are working in the new environment.

View The Pipeline Run History

To look at the run history of the Power Platform Pipeline, go to the host environment and open the Deployment Pipeline Configuration app. Then go to the run history page and select a run.

Get The Managed & Unmanaged Solution ZIP File

During manual exports we download a solution zip file to our machine then import it into the test environment. This gives us a valuable copy of the solution zip file which we can use in redeployments. The Power Platform Pipeline also stores the solution zip files as solution artifacts. Go to the solution artifacts page and open an artifact.

The managed and unmanaged solution zip files are found on the solution artifact details page.

---------------------------------

Deploy A Solution To The Production Environment >>

https://www.matthewdevaney.com/the-complete-power-platform-pipelines-alm-setup-guide/deploy-a-solution-to-the-production-environment/

Once testing is completed we can use Power Platform Pipelines to move the managed solution to the production environment and go-live. Using a pipeline ensures the deployment to production is performed in a consistent manner. And it forces all changes to pass through the test environment first.

Comments

Popular posts from this blog

Powerapps overcome 2000 item limit from any datasource

First go through delegation concept https://tejasadventure.blogspot.com/2020/05/power-apps-understanding.html In powerapps, we observe by default 500 item limit has set with in the app level for any data source. In order to overcome, we have option to set the limit of 2000 item limit maximum in the app. Now using code, MaximoFacility is my data source name contains 3000 items. ColFacilityDropdown is the collection storing the count of items from data source. We expect to see more than 2000 items. Based on StartWith function filtering the data with respective to the charectors and numbers as mentioned below. Code: Place the below code in a button on select property. Add label with code CountRows(ColFacilityDropdown) ClearCollect(ColFacilityDropdown,Filter(Filter(MaximoFacility, Status = "ACTIVE"), StartsWith( Title, "A" ))); Collect(ColFacilityDropdown,Filter(Filter(MaximoFacility, Status = "ACTIVE"), StartsWith( Title, "B" ))); Collect(ColFacilit...

PowerApps multiselect cascading dropdown and save an item to SharePoint List

 I have one scenario as below List 1: Division List has title field List 2: District List has Title and Division Field(LookUp from Division List) List 3: Facility List has Title, District Field(LookUp field from District List) List 4: County List has Title, Facility Field(LookUp field from Facility List) Main List: Spill Report is the main list  Division Field( Look up from Division List) District Field(Look up field from District List) Facility Field(Look up field from Facility List) County Field(Look up field from County List) List Screenshots provided below can be refered for clarification. ----------------------------------------------------------------------------------------------------- PowerApps Canvas Apps In Power Apps Canvas App, We need to first design the app with the 4 respective fields Since those fields are multiselect, then it is to combo box. Generally power apps are not supported for multiselect cascasding dropdown. Refere microsoft documentation, Know Limit...

Creating SharePoint List with columns and content types using Power Automate Flow

 Rest API Uri: https://gitbrent.github.io/SpRestLib/blog/2018/04/20/create-sharepoint-list-columns-using-rest.html Create SharePoint List: site address: Enter URL method: Post URi: /_api/web/lists headers: Accept:application/json;odata=verbose Content-Type:application/json;odata=verbose Body: {   "__metadata": {"type": "SP.List"},   "AllowContentTypes": true,   "BaseTemplate": 100,  "Description": "Admin configuration list",  "Title": "AdminConfigList" } -------------------------------------------------------------------------------------- Multi line text field: create a multiline text column: Site URL: Target Site URi: _api/lists/getbytitle('CI_CompanyNews')/fields Type: POST Body: {     '__metadata': {'type':'SP.Field', 'addToDefaultView': 'true' },     'FieldTypeKind': 3,     'Title': 'Blurb' } Headers:  Accept:application/...