Is it possible in azure devops that the choice of the first parameter by the user, determines the second parameter (type, displayName etc.)?
For example:
parameters:
- name: parametr1
displayName: example1
type: string
default: first
values:
- first
- second
- third
And if the user selects "first" when starting the pipeline, the second parameter to enter:
- name: parametr2.1
displayName: example2
type: number
But if the user selects "second" when starting the pipeline, the second parameter to enter:
- name: parametr2.2
displayName: example2.2
type: boolean
Thanks for any help :)
Variables can be used here like this:
parameters:
- name: name
type: string
values:
- name1
- name2
variables:
- ${{ if eq(parameters.name, 'name1') }}:
- name: var1
value: '111'
- name: var2
value: 'string1'
- ${{ if eq(parameters.name, 'name2') }}:
- name: var1
value: '222'
- name: var2
value: 'string2'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With