On Thursday, March 12, 2015 at 4:47:59 PM UTC-4, Finn Hughes wrote:
>
> I can't see how to call my existing non-CPS groovy scripts, especially the
> system ones, from my workflow.
>
Not quite clear what you are talking about here.
If you mean to run plain old Groovy programs in your workspace, like “Execute
Groovy script” in a freestyle project,
node {
git '…'
sh 'groovy ./mystuff.groovy'
}
(using the tool step as needed to install Groovy
etc.). https://issues.jenkins-ci.org/browse/JENKINS-26635 would make it a
little easier.
If you mean to run code inside the Jenkins JVM, you can use
`evaluate(String)` (if accessible directly as text) or the `load` step (if
a file in a workspace). Both run CPS-transformed.
If you mean to “Execute system Groovy script” like in a freestyle project,
then
https://github.com/jenkinsci/groovy-plugin/blob/485ba4ace71be1b4c140c20235fdd9c31dd13f72/src/main/java/hudson/plugins/groovy/SystemGroovy.java#L38
would need to implement SimpleBuildStep. Note that this plugin is currently
not safe to use in a secured Jenkins installation.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/23d0bfb2-7a4b-426c-936e-a4ae1086538a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.