-
Bug
-
Resolution: Fixed
-
Trivial
-
None
-
Jenkins ver. 1.642.1
Job DSL plugin ver. 1.42
Java 1.8.0_66
Debian GNU/Linux 8
The following script configured for Job DSL plugin works OK when put into "Use the provided DSL script" (or jenkins script console), but not when put into file (into scm) and called via "Look on Filesystem"
The cause of error output is probably trivial and doesn't matter much, but I would expect those two input methods to be identical (both work or fail).
for (job in jenkins.model.Jenkins.theInstance.getProjects()) { out.println("Found job: " + job.name) }
Error output: Processing DSL script jenkins.dsl ERROR: (jenkins.dsl, line 1) No such property: model for class: jenkins
adding imports doesn't help, it doesn't seem to be the difference
import jenkins.* import jenkins.model.* import hudson.* import hudson.model.*
Are they using different classes, or importing different libraries?
Thank you very much for help.