I am working on Azure DevOps YAML Pipelines and trying to do something like -
if project = proj1 or project = proj2: run some commands.
if project = proj3: run some other commands.
Snippet of code:
- ${{ if or(eq(parameters.project, 'proj1'), eq(parameters.project, 'proj2')) }}: # 1st if
- bash: |
echo "Hello"
name: hello
- ${{ if eq(parameters.project, 'proj3') }}: # 2nd if
- bash: |
echo "Hi"
name: hi
Now, I have been using 2nd if conditions for quite some time and that is working flawlessly. The issue is with 1st if condition. Even when correct parameter is passed, the control wont go into that code block.
