Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

List of string variable in azure devops pipeline

I’m creating a simple pipeline to deploy my test azure functions, I can’t figure out why my list of strings in the variable throws this error:

A sequence was not expected

Below is the code that generates the error.

trigger:
- none

variables:
  functionNames:       
    - 'Function1'
    - 'Function2'

stages:
- template: ../Stage/build-stage.yml
  parameters:
    functionNames: $( functionNames )

I tried to review the formatting, location, name but nothing as if it doesn’t want to work.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Azure Pipelines only supports "string" variables, no arrays or lists.

You can split the text on a delimiter or parse it as json to get something that resembles what you want.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading