Reputation: 1996
I have an on-premises build agent running on Azure to create builds of a Unity 3D app. The builds work great but I'd like a way to push the build name back to Visual Studio Team Services so it populates the Implementation dropdown in tickets:
I've found I can set variables in VSTS but part of my build name comes from Unity itself so there's no way for VSTS to know what the build name will be. I'd like the build names in VSTS to match the actual builds that Unity produces if at all possible.
Is it possible to push build names into VSTS from a build agent such that the Implementation dropdown is populated?
This is what my build list looks like after trying Pascal Berger's suggestion:
Upvotes: 3
Views: 741
Reputation: 4342
With the new web based build system you can use the ##vso[build.updatebuildnumber]build number logging command for example in a PowerShell Script to set the build number like this, where UnityBuildNumber
should be set to the build number as defined by unity:
Write-Host "##vso[build.updatebuildnumber]UnityBuildNumber"
On the build definition (under the general tab) you need to set the build number format to $(build.buildNumber)
to use the build number as name of the build.
Upvotes: 4