Oct 31 2022
02:57 AM
- last edited on
Mar 05 2024
02:08 PM
by
TechCommunityAP
Oct 31 2022
02:57 AM
- last edited on
Mar 05 2024
02:08 PM
by
TechCommunityAP
I am having problem in calling template as the pre-condition is not getting satisfied, I am comparing parameter value to select which template to call at runtime, here I am having parameter value coming from strategy matrix and I think that might be the issue.
pipeline yaml :
stages:
- stage: build_stage
jobs:
- job:
strategy:
matrix:
Dev_Build:
build_type: "dev"
Rel_Build:
build_type: "rel"
steps:
- template: test_conditional_template.yml@templates_repo
parameters:
build: $(build_type)
test_conditional_template.yml :
parameters:
- name: build
type: string
default: 'dev'
steps:
- ${{ if eq(parameters.build, 'dev') }}: # this condition is not working
- template: test_conditional_template_generic.yml@templates_repo
parameters:
build_quality: ${{ parameters.build }}