Groovy library

45 views
Skip to first unread message

Guy Matz

unread,
Mar 30, 2016, 4:52:14 PM3/30/16
to jenkins...@googlegroups.com
Hi!  I have some groovy methods that I would like to make generally available to any jenkins job . . .  does anyone have any recommendations for creating a library of methods and setting up jenkins to make the methods in it available to jenkins?  Should they be static methods?  NOT static?  Any thoughts would be greatly appreciated.

Oh!  And does anyone have any advice on how to set up a dev environment to develop this sort of thing?  I find it awkward to develop when I don't have access to all of the objects that would be available within a jenkins instance.

I hope that makes sense.

Thanks,
Guy

Guy Matz

unread,
Mar 31, 2016, 4:06:56 PM3/31/16
to jenkins...@googlegroups.com
Anyone?  Thanks again.

Guy Matz

unread,
Apr 1, 2016, 10:37:01 AM4/1/16
to jenkins...@googlegroups.com
Is anyone getting this?  :-(

Mark Waite

unread,
Apr 1, 2016, 10:47:04 AM4/1/16
to jenkins...@googlegroups.com
I (and other readers of the list) have seen your question.  I don't have any insights to offer.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtWX4XPCjAxgbAkR9SYTU03%2BEKUiShjiEo9LzqRVNBsUdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Baptiste Mathus

unread,
Apr 1, 2016, 10:52:46 AM4/1/16
to jenkins...@googlegroups.com
For the dev part, use an IDE with Groovy support, and load in the classpath the Jenkins core lib and possible plugins you wanna twiddle on.
Maybe look also at the scriptler plugin.

In general, when you don't receive answers, it may help to rephrase or rethink the subject.

From outside, what you wanna do could look like what actually plugins are designed for: offering in an accessible way standard feature for all jobs and so on. So what you want is actually possibly developing a dedicated plugin for your additional features. Rewriting (or not, btw) your groovy script in Java would be very straightforward since this is actually the same thing you're calling.

My 2 cents


Reply all
Reply to author
Forward
0 new messages