cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Phani
Microsoft
Microsoft

Set build version in azure devops release

Hello Team, 

 

I am planning to trigger my release pipeline through power automate and have use azure devops connector for that . I find ways to set the release variables but could not find how can i set the version of the build for which i want to create the release . could you please tell me how can i set the build number 

5 REPLIES 5
Expiscornovus
Super User
Super User

Hi @Phani,

 

I would probably use some variables and a logging command of Azure Pipelines, https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands

 

You could use a PowerShell task to execute these kind of commands.

 

Below is an example of a flow which queues a new build, waits for it to finish and creates a release with the latest build number.

 

releasenameandbuildnumber.png

 

The end result should look something like like below:

testrun_devopsrelease.png

 

In Azure DevOps I used the settings below.

 

1. Build Pipeline has the following variable

 

buildpipeline_variable.png

 

2. In the options the Build number format is set to use the new variable.

 

custombuildnumber.png

 

3. The Release Pipeline has the following variable.

 

releasepipeline_variable.png

4. The Release Pipeline uses a PowerShell task which updates the release name with a logging command.

 

azuredevops_loggingcommand.png

 

Hopefully this helps a bit?



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Phani
Microsoft
Microsoft

Thanks for the details . I could not find the connection where you are creating this release for that build number only . I see that you are updating the release name using powershell task but how are you setting the build number for that release 

Phani
Microsoft
Microsoft

There might be several builds for my pipeline ( like  A, B, C ) but one will be tested by the testing team and certified i.e for ex  B , so when i create a release , i would like to create it for B but not C as C will be the latest one and it will take it by default, if i create a release but would like to have it with B or of my choice

Phani
Microsoft
Microsoft

@Expiscornovus : could you please provide input here 

Expiscornovus
Super User
Super User

Hi @Phani,

 

Thanks for sharing a bit more detail about your requirements.

 

Within the flow I shared earlier I queued a specific new build. Lets say B (that is selected in the Build Definition ID field). I added a delay which should cover the time which it needs for building, in my setup 1 minute. After that the new release is created with the latest build. Which should be B, because it has just been build via the flow.



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (5,248)