Here is an example of how this feature could be useful.

First create a groovy script that imports a class, call this script "caller.groovy":

import JenkinsSystemGroovy
def j = new JenkinsSystemGroovy(out)

Next create the file that contains the class, call this file "JenkinsSystemGroovy.groovy":

class JenkinsSystemGroovy {
  def JenkinsSystemGroovy(out) {
    out.println("Hello")
  }
}

Get those two files in the workspace (for example, your workspace could contain a git clone of your work that includes those files).

Next we want to run the caller.groovy script as a System Groovy Script in the Build phase, so we configure the build phase as such:

Execute system Groovy script
[ ] Groovy command
[x] Groovy script file
caller.groovy
Variable bindings: (leave empty)
Classpath: $WORKSPACE

This fails on the import. This bug report is about making this possible.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to