I have multiple layers of template for my DevOps pipeline. I am trying to do the following:
### template A ###
parameters:
- name: check
type: boolean
default: false
jobs:
- template: template B ### template B has param 'count'
- ${{ if ne(parameters.check, true) }}:
count: 1
- ${{ if eq(parameters.check, true) }}:
count: 5
### template B ###
parameters:
- name: count
type: number
default: 0
jobs:
- some jobs
Now when I try to pass the parameter based on the condition, it fails with 'Expected a mapping' error. Is there a different way to do this? Thanks!