Though you need to use each a Username/Password authentication in opposition to your environments or a Service Principal/consumer secret authentication, I desire to make use of the Service Principal method. With a view to use the Service Principal method, I have to create a Service Principal account and App Registration in Azure.

You may observe the hyperlink under, which is a earlier weblog that I wrote to configure oAuth or Service Principal/App Registration.

Including the Utility Consumer, and assigning the position to the Utility Consumer must be accomplished in all environments the place you need this to be configured.

Let’s first check out the answer that we created in our dev surroundings. The answer incorporates the Account and Contact entities, in addition to a customized Lead entity that was created.

Assuming that you have already got a DevOps surroundings, let’s check out what we want, or what we have now created.

We created a brand new DevOps occasion known as MSBizApps and inside it the BizAppsALM venture. We additionally created a brand new Repo for that venture.

Azure DevOps ALM Process - New Project

Now, we will get began. Step one is we have to create a Pipeline that may export the answer file. Based mostly in your configuration, there are numerous steps that you just would possibly take. Within the screenshot under I cowl all the mandatory steps. I duplicated the Export Answer and the Unpack resolution so as to decide whether or not you may be utilizing managed or unmanaged options, however the beneficial method is utilizing managed options.

Per the documentation Unmanaged options are utilized in improvement environments when you make adjustments to your software. Managed options are used to deploy to any environments that isn’t a improvement surroundings for that resolution, comparable to Take a look at/QA, UAT, SIT and manufacturing.

You may export your unmanaged resolution and unpack them, in order that you should have a replica of your unmanaged resolution supply in your DevOps repository.

Let’s begin with creating a brand new pipeline by deciding on Pipelines and selecting the New Pipeline choice. Choose the Use the traditional editor hyperlink on the New pipeline (The place is your code?) web page, choose the Azure Repos Git that you just created, and within the Choose a template web page, click on on the Empty job hyperlink. This can open up the brand new pipeline web page. Let’s begin by giving the pipeline a reputation. You need to use any identify that you prefer to. In our case, I used BizAppsALM-PublishExportUnpackGit.

Azure DevOps ALM Process - New Pipeline

We might want to add varied duties to get the answer prepared. Let’s go over these steps and the configuration one after the other.

The primary activity, that could be a prerequisite for something that we do with the Energy Platform Instruments is the Energy Platform Software Installer. There isn’t any configuration necessities for this activity.

Power Platform Build Tools - Tool Installer

The following activity is to Publish the customizations. On this activity too, there’s not a lot configuration aside from setting the authentication sort and the Connection String.

Power Platform Build Tools - Publish Customizations

You probably have not set your connection string but, you are able to do so by clicking on the + New button to the best of the Connection String drop down. This can ask you for the surroundings url, listing (tenant) id, software (consumer) id and consumer secret, in addition to the identify for the connection string. When you create it it is possible for you to to make use of the connection string in your code. You need to create connection strings for Dev, Take a look at and Prod (or no matter different environments you want).

The following activity is to export our resolution, we have now to prospects right here, to export as unmanaged or managed, however earlier than we export our resolution, let’s go forward and create a variable that may retailer the answer identify. We do that by clicking on the variables tab, deciding on Pipeline variables and creating a brand new variable. We’ll name the variable SolutionName, and enter the worth with the identify of the answer (as proven within the picture under).

Azure DevOps ALM Process - Pipeline Variables

Now, let’s proceed with the earlier activity of exporting the answer. Within the case of exporting the answer as an unmanaged resolution, we might want to supplied the authentication data, the answer identify and the answer output file. We also needs to verify the choice to export the answer as asynchronous operation. The screenshot is proven under. Discover that we use the variable $(SolutionName) as a substitute of the particular identify of the answer.

Power Platform Build Tools - Export Solution (Unmanaged)

The logic for exporting the answer as managed may be very comparable. The one variations are the Answer Output file identify and the Export as Managed resolution checkbox must be checked.

Power Platform Build Tools - Export Solution (Managed)

You’ll discover within the two duties above that the Answer Output file incorporates the Construct.ArtifactStagingDirectory variable. This can be a predefined variable that can be utilized wherever inside your pipeline. The hyperlink under reveals the checklist of predefined variables in Azure DevOps/Azure Pipelines.

The following activity, which is an non-obligatory activity if you want so as to add to your pipeline is operating the Energy Platform Checker in your resolution file. You may specify the identify of your resolution file right here and the rule set whether or not this can be a Answer Checker rule set or a Certification rule set for an AppSource Certification. You too can specify whether or not this course of ought to fail if there are errors. If that is solely in your inside deployment, you must just remember to specify the Proceed on error choice.

Power Platform Build Tools - Solution Checker

The following activity, which is the ultimate activity that makes use of the Energy Platform Construct Instruments is to Unpack the Answer. This can create particular person information of all of the elements that make up the answer. You may unpack the unmanaged resolution in addition to the managed resolution. This shall be then deployed to supply management and can include the historical past of your resolution deployments.

Let’s begin with the unmanaged resolution. We have to present the answer identify and the goal listing identify. Once more on this case we are going to use a few of the predefined variables to retailer the extracted information. The screenshot under incorporates the unmanaged configuration.

Power Platform Build Tools - Unpack Solution (Unmanaged)

The unpack resolution for the managed resolution seems to be precisely the identical aside from the options names and the kind of resolution.

Power Platform Build Tools - Unpack Solution (Managed)

Whenever you do that, you’ll discover that you’ve the power to mix these two collectively, as the kind of resolution incorporates choices for Unmanaged, Managed or Each.

Power Platform Build Tools - Unpack Solution (Type of Solution)

As we wish to deploy this later to our larger environments, the subsequent activity can be to publish an artifact that may include the managed resolution. The Publish Pipeline Artifact activity permits us to specify the placement of the artifact that was used from the export of the managed resolution (as that is what we are going to use to deploy to the upper environments.

We create an artifact identify known as drop which is able to include the managed resolution, after which publish it to Azure Pipelines.

Azure DevOps ALM Process - Publish Pipeline Artifact

The ultimate step shall be to publish this to our Supply Management system. This can deploy your unmanaged or managed resolution primarily based on what you could have created in earlier steps. For those who created each managed and unmanaged it’s going to deploy them each to Supply Management.

Azure DevOps ALM Process - Command Line Script - Commit to Git

The under script incorporates the textual content that needs to be used on this activity:

echo commit all adjustments

git config person.e-mail ""

git config person.identify "Automated Construct"

git checkout grasp

git add --all

git commit -m "resolution updates"

echo push code to new repo

git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin grasp

Now that we have now completed our resolution we will go forward and Queue it up and run the answer.

If we check out our supply management after the answer has been run we are going to see that the our repository incorporates two folders which include the supply for the managed code and the unmanaged code, as seen within the screenshot under:

Azure DevOps - Power Apps Repo Solutions

The following half is to create the discharge pipeline. In our explicit case we have now three environments: Dev, Take a look at and Prod. Dev is our unmanaged surroundings, and check and prod are the managed surroundings. This half is definitely easy and straight ahead.

For those who didn’t configure your connections in your larger environments, you must do it now. Let’s go forward and begin with a brand new launch pipeline.

In Azure DevOps, underneath Pipelines, click on on Releases, and choose New to create a brand new launch pipeline. The New launch pipeline window will open with a panel displaying on the best hand aspect. Within the Panel click on on the Empty Job hyperlink to begin with an empty job (as proven under):

Azure DevOps ALM Process - New Release Pipeline

Begin by giving your launch pipeline a reputation, and including an artifact. The artifact would be the identify of the pipeline that you just completed creating. As soon as you choose the Construct Pipeline, it’s going to default to the newest model and you may present a Supply alias (pleasant identify) for this artifact.

Azure DevOps ALM Process - Release Pipeline - Add Artifact

Subsequent we are going to create a deployment stage to our check surroundings. By default one stage will already be created. Give a reputation to the stage, and click on on the hyperlink that claims 1 job, 0 duties.

We’ll add two duties to this stage. The primary would be the Energy Platform Software Installer, and the second would be the Energy Platform Import resolution activity. Earlier than we configure this, let’s go forward and check out the agent job. On the backside of the Agent Job, underneath Artifact obtain part, we will see the artifacts that shall be downloaded, and in our case the, which was added in one of many earlier steps as an artifact.

Azure DevOps ALM Process - Release Pipeline - Artifact Download

Subsequent let’s take a look at the Energy Platform Import resolution. Right here we must choose the connection to make use of, and the file or folder the place the answer will reside. After we click on the … subsequent to the Answer identify, it’s going to popup a window which is able to permit us to pick out the artifact that was beforehand added to the pipeline.

Azure DevOps ALM Process - Release Pipeline - Import Solution Select Artifact

As soon as we chosen the answer enter file, we have to verify the Import as a Managed resolution choice and to run the import asynchronously. 

The very same steps will have to be follows for manufacturing surroundings by creating a brand new stage. As soon as we have now created the stage for manufacturing as effectively, our last launch pipeline will appear to be this:

Azure DevOps ALM Process - Release Pipeline - Artifacts and Stages

The one factor that’s nonetheless wanted is so as to add the approval for going from check to manufacturing. After we hover over the particular person icon on the proper of the Deploy to Take a look at, we are going to see the textual content Put up-deployment situations. After we click on on this, we are going to see a panel that specifies totally different situations which incorporates Approvers, Gates and Auto-redeploy triggers.

After we allow the Put up-deployment approvals and set an approver, the approver will get an e-mail notification specifying that they need to approve this stage to ensure that the subsequent stage to execute. You probably have a number of surroundings for QA, UAT, SIT, and many others… that required deployment previous to Manufacturing, you’ll be able to create these approvals at any of the phases.

Azure DevOps ALM Process - Release Pipeline - Post Deployment Conditions

When the pipeline is run, and deployed to QA, it’s going to ship a notification e-mail to the Approver specifying that an approval is required, as proven within the picture under. The approver can view the approval after which approver it. As soon as accredited, the pipeline will proceed to the subsequent stage.

Azure DevOps ALM Process - Release Pipeline - Approver Notification

After you’re accomplished with the pipeline and approvals, the pipeline will look as follows:

Azure DevOps ALM Process - Release Pipeline Completed

Now that you’re accomplished, you’ll be able to present triggers and schedules, and create the discharge. I hope this submit was instructional and supplied some insights to the advantages of utilizing ALM as a part of your resolution deployment processes.


Please enter your comment!
Please enter your name here