1

I created a task group for Build as well as Release. When the Build or Release are running the tasks are shown. In my case I use the same task group multiple times for different contexts in the same pipeline and I would like to include a parameter in the task name. I.e. when the task name is "Task A" it should be "Task A: $(contextName)" whereas contextName is a task group parameter.

Just adding $(contextName) does not work. Is there a way to achieve that?

Thanks

EDIT: the parameter values themselves are variables that are made available via a Tokenizer. I.e. the actual values are in config files and during execution of the pipeline the content of the corresponding config file is loaded and the variables with their values created. In the task group parameters themselves I pass in these variables what works fine for passing the actual values to the tasks. But putting them in the name of the task does not work - it then shows the variable as "$(contextName)" and does not resolve it. Furthermore is it not possible in my context to set default values as the task groups are generalized and the input variables differ.

quervernetzt
  • 10,311
  • 6
  • 32
  • 51

1 Answers1

0

Variables used in the tasks are automatically extracted and converted into parameters for the task group. Values of these configuration variables will be converted into default values for the task group.

As the document states, if you want to use a parameter in the task group, you first need to make sure that your tasks in the task group have a reference to this parameter. The parameter is set in the Variables of the pipeline.

If you don't reference the parameter in your tasks, then there is no parameter when you create the task group. The picture below is an example.

enter image description here enter image description here

If you have the i.e.contextName parameter in your task group,then you can call this parameter on the task name i.e.TaskB : $(contextName) .

enter image description here

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25