Is it possible to fetch a select parameter's label?

We have a couple of deploy jobs that can point at multiple environments, so developers can push a testing build to an isolated environment.

These environment ids are not an easily recognizable value, and to solve this issue we make use of a Select parameter with human friendly labels matched to the less friendly ids.

What I'd like to do is include this environment id in the build number, so devs can see what recent pushes were done to which envs, but this runs back into the issue that using %environment_id% in the Build Number Format leaves me with a messy envid in the Build Number when I'd rather have the label for the selected value.

For example, the spec for this parameter is like this `select label_01='Test1' data_01='079dd8e0-9c50-4f8c-b502-00dbe41e777d' label_02='Test2' data_02='ce049a89-7489-4d57-9906-c964c240bab7' label_03='Test3' data_03='30b79dbb-720f-4a78-ad24-8d124edaef31' `. Values and labels have been changed for security reasons, but this is representative of the situation.

Is there any way to retrieve the label for the selected value in this situation?


Please sign in to leave a comment.