Details
-
Type:
Improvement
-
Status: Fixed but Unreleased (View Workflow)
-
Priority:
Critical
-
Resolution: Not A Defect
-
Component/s: pipeline-model-definition-plugin
-
Environment:Jenkins: 2.73.3
-
Similar Issues:
Description
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 } }
have the same issue as Daniel Mladek.
It's possible to set conditional trigger on environmental variable?