Why?
In my previous post Power Platform: Solutions and Azure DevOps Pipelines » Knowhere365, I shared the possible benefits of using an Azure DevOps Pipeline for your Power Platform.
What?
In this post, I explain into detail how to setup a Starter Pipeline and include some of my lessons learned.
How?
Double check to make sure you have done all the preparations mentioned in the first post linked above.
1) First we create a Git Repository by selecting the Repos section of the Azure DevOps Project. We use a Git Repo to store all our DevOps Pipeline files and to store all our Power Platform source code files. Just think of examples like unpacked unmanaged solutions, the zipped unmanaged solutions, managed solutions, unpacked Power Apps definitions, unpacked Power Automate definitions et cetera. In this example, I wanted a specific Repo for my Power Platform Solutions so I am not using the default Repo:
I created a new one using the New repository option and named it Power Platform Applications:
The Repo created a README.md file automatically and it is best practice to give some information about this Repo in this file. What it is for, who to contact and how to work with it.
2) In my Git Repo, I want to have a folder to keep all my Pipeline files together: Pipelines instead of by default in the root folder of the Git Repo. If you have multiple Pipelines storing the .yml definition in the root folder of the Git Repo, it can become quite messy real quick. I use a dummy BLANK file that I can easily remove later (in Git we cannot create folders without content):
I will also create a folder in this Git Repo to store my actual solution files: ExportedSolutions.
Don’t forget to Commit your changes to the Repo with a meaningful name:
3) Now that we have setup the Git Repo, we will create a fresh new Pipeline. The Pipelines section of an Azure DevOps Project can have its own folder structure to keep your overview nice and tidy. I want to have a Pipelines folder just for my Power Platform Solutions:
Now I can use the All tab in the Pipelines section. In this tab, I create a Pipeline and store it immediately in the desired Pipelines folder (not to be confused with the Git Repo folder, which confusingly enough I named the same 😅):
The first step on creating a new Pipeline is to determine where the all the files will be saved.
I want to save all my source code files in the Git Repo created earlier, so I select Azure Repos Git:
In the next step I select the desired Git Repo. Please note that by changing the filter to All projects, we are even able to select a Git Repo from another Azure DevOps Project 😎.
I just want to use the Git Repo connected to the same project that will host the Pipeline. After selecting the Expert Team BA/Power Platform Applications Repo, I will select the Starter pipeline:
A very important stap is to put the Pipeline .yml file in the right Git Repo folder (not to be confused with the Pipelines folder). We do this by typing the desired Git Repo directory in the path section:
Click Save (Save and run not needed) and commit with a meaningful name again:
The name of the freshly created Pipeline will be defaulted to the Git Repo name in the Pipelines section 🙄…
…this is just a visual naming for the Pipelines section. The actual Pipeline .yml file in the Git Repo is named how we specified it when typing the path above:
Just rename the visual name of the Pipeline to keep it meaningful:
Now we can run this Pipeline manually. However the end result of the run produces absolutely nothing. It only shows the running script that shows hard coded text:
Check out the Azure Pipelines New User Guide – Key concepts – Azure Pipelines | Microsoft Docs for some basics.
Stay tuned for my next post on how this Azure DevOps Pipeline can be used for the Power Platform 💪👍.
are you going to save all of your solutions in the same repo? Is that best practice? I thought it was not but I am struggling really hard to create a pipeline which could dynamically push to several repo
In this simple starting post everything in one Repo indeed. Normally I would say a Pipeline would have a single business purpose –> then I would want my source code of that business purpose al saved together in the same Repo.
I have managed to make the Branch of the Repo dynamic using a variable. However making the actual Repo dynamic, was not a scenario I have been investigating (yet). Keep me updated on your journey 😁