Menu
metio
website
  • home
  • contact

Wednesday, 15 June 2022

Azure DevOps: PowerPlatform: Set solution version

In order to fully utilise managed solutions in your build and release pipelines you need to make sure the solutions are always incrementing their version (the platform will usually block you trying to install the same version of a solution.  This post will help guide you through the process in Azure DevOps using the Microsoft provided Power Platform Build Tools available from the MarketPlace. 

Prerequisites

You will need an Azure Git Repository set up in your Azure DevOps project. In this example we will call it PP_Solutions (short for PowerPlatform Solutions).  I would recommend you keep your PowerPlatform solutions in their own repository - it makes later steps much easier.  You can read more about how to create a new Git repo in your project.

Create connection to Power Platform

In your Azure DevOps projects:

  • Click the Project Settings link at the bottom of the left navigation
  • Select Service Connections
  • Click the New service connection button in the top right
  •  Select Generic, scroll to the bottom of the page, then click Next
  • Enter the following details for your Power Platform dev environment
    • The Url
    • The username (requires System Customizer privileges as a minimum)
    • The password/token for the above user account
    • The name for the connection - I usually use something like <Env>-Dev, where <env> is the name of the environment/project you are working with.
    • Check the Grant access permission to all pipelines checkbox
    • click Save

Creating the pipeline

This blog post won't take you through installing the extension set itself (that may come in the future if needed) but will focus on setting up the pipeline itself.

  • In the left navigation of DevOps, click on Pipelines
  • Then click on the New pipeline button in the top right
  • Select Use the classic editor
  • Select the Repository
    • Select the Team Project (the current project)
    • Select the repository (PP_Solutions)
    • Select the main branch
    • click Continue
  •  Select a template
    • select the Empty job option link at the top of the list of types.

Configuring the pipeline

First, configure the properties for the pipeline itself, including its Name, Agent Pool and Agent Specification.  
  • Name: I usually name them in a manner that lets me follow the order easily such as: 01 - Set Solution Version, or PP-01 - Set Solution Version
  • Agent Pool can be left as default for now
  • Agent Specification: leave as default or select Windows-Latest so you don't have to keep updating it.
  • Next, click on the item called Agent job 1, change the name to Set Solution version (you can update the name if you want, I would recommend setting a name if you are going to have additional jobs in a single pipeline).
  • Then in the additional options, check the Allow scripts to access the OAuth Token checkbox.

Adding the build pipeline tasks

To the right of the agent job (named Set Solution Version) you will see a + (plus icon). Click the plus to add the pipeline steps:
  • Click the + icon
  • In the search box type Power Platform Tool Installer
  • Click Add next to the task that's displayed under the search box
  • Again, in the search box type Power Platform Set Solution Version
  • Click Add next to the task that is now displayed under the search box.

Configuring the pipeline tasks

In this case, you only need to worry about configuring the Power Platform Set Solution Version task

  • Select the task from the list of tasks under the Agent Job Set Solution Version
  • Select the connection you created to your dev environment in the prerequisites step
  • Enter the solution name (in this case its SS2022)
  • For the Solution Version Number I like to add the build ID to get an automatically incrementing number, in this case enter 1.0.0.$(Build.BuildId).  
You should be ready to run the pipeline now, so click Save & queue at the top of the pipeline screen.  Your pipeline will be queued and should run successfully.


 


Posted by Mauro Masucci at June 15, 2022
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Azure DevOps, Power Platform Build Tools, PowerPlatform

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Metio

Powered by Blogger.

Report Abuse

Popular Posts

  • Azure DevOps: PowerPlatform: Export Solutions (and commit to source control)
    In this blog post we will cover exporting the solutions so that we can commit them to source control and also ensure that we will have the r...
  • Automated PowerPlatform deployments using Azure DevOps Series
     A series of blog posts on using classic build and release pipelines in Azure DevOps to (as covered at ScottishSummit2022): Set the solution...
  • Testing the template
    this is testing the new template...
  • Home

About Me

Mauro Masucci
View my complete profile

Search

Labels

Azure DevOps Power Platform Build Tools PowerPlatform

Blog Archive

  • ▼  2022 (3)
    • ▼  June (3)
      • Azure DevOps: PowerPlatform: Export Solutions (and...
      • Azure DevOps: PowerPlatform: Set solution version
      • Automated PowerPlatform deployments using Azure De...
  • ►  2019 (1)
    • ►  April (1)

Get In Touch

  • +44 (0) 7855 278958
  • hello@metio.co.uk
  • Motherwell, ML1 2PT
© Untitled. Design TEMPLATED. Images Unsplash. Background vector created by starline - www.freepik.com