gradle-jenkins-plugin icon indicating copy to clipboard operation
gradle-jenkins-plugin copied to clipboard

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

Open dowhiletrue opened this issue 9 years ago • 0 comments

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.

dowhiletrue avatar Dec 09 '14 17:12 dowhiletrue