ghale / gradle-jenkins-plugin

Gradle plugin to programmatically configure Jenkins jobs.
123 stars 42 forks source link

Common way to check for undefined variables in jenkins and gradle plugin? #50

Open dowhiletrue opened 9 years ago

dowhiletrue commented 9 years ago

Hi I would like to use my job dsl files using the jenkins plugin and using the gradle plugin.

Using ${variable} it is possible to access a jenkins environment variable. This as well is possible using the gradle plugin.

Is there a common way to check for undefined variables. I tried System.getenv(), System.getProperty() and hasProperty(). None of these approaches seems to work in both cases.