-
Improvement
-
Resolution: Not A Defect
-
Critical
-
Jenkins: 2.73.3
Hi,
Currently there is no option to set an environment variable based on boolean value within the environment directive. I think it is crucial to implement support for something like this:
pipeline{ agent any environment { /*Option1*/ condition $params.some_bool_parameter{CC = "1"} /* Option2 variable will be set to "1" only if the boolean value is true */ CC = $params.some_bool_parameter : "1" /* This is currently supported */ CC = $params.some_non_bool_parameter } }