-
Type:
Improvement
-
Resolution: Not A Defect
-
Priority:
Critical
-
Component/s: pipeline-model-definition-plugin
-
Environment: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
}
}
Â