maikvandergaag / msft-extensions

Repository for extensions mainly used for Azure DevOps Extensions
https://msftplayground.com
MIT License
126 stars 81 forks source link

How to use the Release variable json field? #444

Closed GeraintDavies closed 1 year ago

GeraintDavies commented 1 year ago

I have API test pipeline thats being tiggered by this task. Im trying to set variables using the 'Release variable json' field but not sure how to get it working.

Each stage of my release will have a different URL so need to populate the URL variable in my JSON file using the trigger task.

Question I have is, is it possible to do that? content within my JSON file is an array so need a specific location. e.g. URL value variable is in the 10th position

I know the format is below {'name' : 'test', 'newValue' : 'test'}

maikvandergaag commented 1 year ago

Could you further elaborate what you want to do.

GeraintDavies commented 1 year ago

After trial and error I got it working, same set up as setting variables in the Yaml file, but in JSON format e.g. {'values.0.value': '$(releaseVariable)'}