Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Unanswered

Set build version in azure devops release

Like (0) ShareShare
ReportReport
Posted on 21 Mar 2022 23:06:10 by Microsoft Employee

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 

  • Josephkm_lim Profile Picture
    64 on 16 Jun 2023 at 23:40:27
    Re: Set build version in azure devops release

    Hi Phani and team

     

    Have you found the solution? I have the same issue.

     

    Thanks

  • Expiscornovus Profile Picture
    31,728 Most Valuable Professional on 23 Mar 2022 at 21:24:15
    Re: Set build version in azure devops release

    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.

  • PJ-10092242-0 Profile Picture
    Microsoft Employee on 23 Mar 2022 at 20:28:15
    Re: Set build version in azure devops release

    @Expiscornovus : could you please provide input here 

  • PJ-10092242-0 Profile Picture
    Microsoft Employee on 22 Mar 2022 at 17:16:57
    Re: Set build version in azure devops release

    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

  • PJ-10092242-0 Profile Picture
    Microsoft Employee on 22 Mar 2022 at 17:14:55
    Re: Set build version in azure devops release

    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 

  • Expiscornovus Profile Picture
    31,728 Most Valuable Professional on 22 Mar 2022 at 12:21:38
    Re: Set build version in azure devops release

    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?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - General Discussion

#1
stampcoin Profile Picture

stampcoin 23

#2
Pstork1 Profile Picture

Pstork1 20 Most Valuable Professional

#3
Gprior Profile Picture

Gprior 19

Overall leaderboard
Loading started