Conditionally setting values in the config file

Conditionally Set Values

When using parameters and pipeline values in your config.yml file, it is possible to conditionally set a value. 

To check if a value is true or a non-empty string:

<<#parameters.parametername>> <</parameters.parametername>>

To check if a value is false or an empty string:
<<^parameters.parametername>> <</parameters.parametername>>

For example, you can conditionally insert a value into your config.yml file based on whether pipeline.git.tag contains a value.


In the above example, the line <<#pipeline.git.tag>>Sometext<</pipeline.git.tag>> would be replaced with Sometext if pipeline.git.tag contained a value.

Was this article helpful?
6 out of 12 found this helpful



Article is closed for comments.