Skip to content

Expand Variable

Jesse Houwing edited this page Mar 5, 2016 · 6 revisions

The task is as simple as it's purpose. You tell it which variable to expand, and that's what it does.

Background

When you define a variable in the Variables screen and use other variables as value, they won't be expanded (as you may have expected). Instead the literal text is passed to the tasks in the workflow. Without this little task the following configuration won't work:

Variable Value
Build.DropLocation \share\drops$(Build.DefinitionName)$(Build.BuildNumber)

By adding the Expand variable(s) task to the top of your workflow, it will take care of the expansion, so any task below it will receive the value you're after.

Note

The task has limited support for recursive nesting. Depending on the complexity of your nesting, the task may not fully expand your variables.

Configuration

  • Variable Name(s) - Specify one or more variable names, separated by ,, ; or newline. Do not add $(..), as this will not use the variable name, but its value.
Clone this wiki locally