Visual-studio – How to Label Source upon successful build on Visual Studio Team Services

azure-devopsazure-pipelinesmsbuildvisual studio

I was trying to use new Build on Visual Studio Team Services (not XAML) but couldn't figure out how to label the source upon successful build. Any idea?

Below is the screenshot that shows how to do in XAML one.

enter image description here

I already have a feature request at https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/9613014-allow-label-source-upon-succesful-build-on-visual I'm actually asking for a workaround until Microsoft implements it.

Best Answer

I think Yves Dierick's answer was correct back in October 2015, but the layout of the VSTS screens has changed a lot since then. In the latest version (as of February 2017), you can add a label to a successful build by selecting the Get Sources task in the Build Definition, choosing show Advanced Settings in the top-right corner and then selecting the On success radio button under the Tag Sources section that appears.

Took me a while to find it, so I thought it might help someone else. It doesn't help that this option is under "Tag sources" and doesn't mention the word "label" at all.

enter image description here


Update 13/03/2018

They've tweaked the layout of this page again, but made it simpler if anything, and now the option is more helpfully named "Label Sources". Updated option for labelling builds