Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to concatinate value in loop using YAML #575

Open
SwardCoder opened this issue Sep 20, 2022 · 1 comment
Open

How to concatinate value in loop using YAML #575

SwardCoder opened this issue Sep 20, 2022 · 1 comment

Comments

@SwardCoder
Copy link

i have an azure pipeline with parameters and I want to get a variable value filled by concatenating the parameter's name but when I tried to do that using YAML loop its threw error

parameters:
  - name: applications_module
    displayName: Applications
    type: boolean
    default: 'false'
    values: []
  - name: management
    displayName: Management
    type: boolean
    default: 'false'
    values: []
  - name: It
    displayName: IT_module
    type: boolean
    default: 'false'
    values: []

variables:
- name: allValues
    ${{each item in parameters}}:
      ${{if contains(item.name, '_module')}}: 
      value:  ${{ allValues = item.name }}
       # here I want to concatenate all the parameters names that have name _module but this statement is throwing an error 

Unexpected symbol: '=item'
is the Error
so can any one help me how to concatenate all the parameters as comma separated into a single variable
i tried all ways and came back here :(

@guidooliveira
Copy link

Excellent feature suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants