cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sperry1625
Solution Supplier
Solution Supplier

Azure DevOps Power Platform Build and Deployments and Azure Insights Instrumentation Key

A Little Background

I build Power Apps for my company. We leverage Multiple DEV environments, UAT environments and production environments as part of our platform governance. What environments are used depends on what the app is and whom it is for.  We are also leveraging solutions to perform promotion from DEV->UAT->Production.  We have been doing that for about 9 months or so, but all manually. Ugh, what a PITA and so time consuming.

As part of our Power App development we are also leveraging Azure Insights, so we have the Instrumentation key stored in the App object. There lies our problem, the Instrumentation key value cannot use a variable or code to set it. It is basically hardcoded in the App object.  This presents a problem for us as we use different Azure Insights instances for each environment.

We are now in the process of introducing Azure DevOps into our deployment process. Eliminating the manual process we do now to move code from one environment to another.

So you are all caught up on what we have been up to...

DevOps Approach

We are building Pipelines to perform builds and promotion of our solutions.

Step One: Build Pipelines

Each Build Pipeline uses a Task group to create a new Build for a solution.  The Task group has the following steps:

  1. Export Solution as Managed
  2. Export Solution as Unmanaged
  3. Unpack Managed Solution
  4. Unpack Unmanaged Solution
  5. Publish Artifacts Managed Solution
  6. Publish Artifacts Managed Solution
  7. Check-in All Assets to Repository

So the goal here is to export a solution as both managed and unmanaged, unpack it, and store all the unpacked code in the source repository.

Our goal is to store the source of the exported ZIP files in source control, not the actual ZIP files. When we deploy a Solution to another environment we repack the solution from the repository and import that packed solution.

So that is step one... COMPLETED

Step Two-X: Work in Progress

What I would like to do from here is to pack the code back into solutions but first update the InstrumentationKey then import the solution into the appropriate environment.  I am looking for some advice on the best way to accomplish this.  We have instrumentation keys for DEV, UAT and Prod. So we would need to use the same source repository and update the key, pack a solution, then do it again for prod. (This would be so much easier if Microsoft allowed the use of an environment variable, or a variable period, to set the key.)  But short of that miracle, can anyone provide any advice on how best to accomplish what we need?

 

Thank in advance.

 

Steven

Regards,

-S

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

0 REPLIES 0

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,924)