Jenkins Pipeline: Conditionally Define Variables – Groovy Script

The Groovy scripting language supports conditional structures, that can be used in Jenkins pipelines. Assume that you have a parametrized Jenkins job and in a Jenkinsfile you have a variable that should be defined depending on provided parameters. Here is an example of how to conditionally define variables in a Jenkins pipeline using the Groovy […]