Multiple steps output the same variable

Considering two steps from the same step template, that run on different channels with different parameters, and output the same variable

How can I access that “common” variable on a third step without referencing the previous step name explicitly?


StepA.1 (channel Stable) => outputs VirtualDirectoryPath
StepA.2 (channel Beta) => outputs VirtualDirectoryPath
StepB (any channel) <= uses VirtualDirectoryPath

My scenario is that StepA.1 and StepA.2 output a VirtualDirectory path that needs to be used by StepB - I need different parameters/values depending on the Channel thus the need to have 2 StepA.

To access a previous step output variables I need to reference the step by Name and, since duplicated step names are not allowed, I can’t find a clean way of doing this.

Is it possible to output “global” variables?



Hi Pedro,

Thanks for reaching out. Unfortunately that’s not possible. What you could do is:

  • If both StepA and StepB are executed on the same machine, you could save that value somewhere on disk and retrieve it from StepB

  • In your step template’s Powershell logic, check if any of the 2 output variables has a value (only one should have at a time as you can deploy to only one channel) and keep the one that has one.

Hope that helps,