'Azure Devops: Using dynamic variable names in customCondition
I have created a pipeline variable dynamically using powershell script with variable name
$ReleaseVariableName = "[$(Release.EnvironmentName)]_should_run_regression"
Now in next Job, I want to add a customCondition to check if value of above variable is "True".
I have tried couple of steps like using join,
- eq(join('_', @(variables['Release.EnvironmentName'], 'should_run_regression')), 'True')
but that doesn't work since I cannot declare array using @ in custom condition. So is there a way to use dynamic variable names in azure custom conditions?
PS:
- I am working with Classic UI so YAML solutions don't work.
- The step where I am using this custom condition is agentless job, so I can't use powershell scripts to read dynamic variable and set a Job level variable
- I have an alternative of creating different variables for each stage but that looks awful
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

