I have long running lines in my azure devops yaml file such as
condition: and(succeeded(), or(eq(variables['SomeStep.IsScheduledBuild'], 'True'), eq(variables['userOverride.Setting1'], 'yes'), .......))
What is the line break character for such long running conditions so that the yml file conditions such as above can be placed neatly in multiple lines?
Thanks
What is the line break character
It should be |.
Please refer to below yaml:
- task: CmdLine@2
condition: |
and(succeeded(), or(eq(variables['SomeStep.IsScheduledBuild'], 'True'),
eq(variables['userOverride.Setting1'], 'yes')))
inputs:
script: |
echo Write your commands here
echo Hello world
Put a | after condition: then you can seperate the expression to multiple lines.
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