On 01.04.2016 16:40, Guy Matz wrote:
Hi! I have some groovy methods that I would like to make generally available to job in jenkins . . . does anyone have any recommendations for creating a library of methods? Should they be static methods? NOT static? Any thoughts would be greatly appreciated.
You could consider writing extension methods, or at least write your library so it can be used for extension methods or categories. That would mean static methods, with the first parameter being the class you want that methods to be working on later.
If you wanted to make a String.foo(int) method, you would define a method static foo(String, int) for example.
Oh! And does anyone have any advice on how to set up a dev environment to develop this sort of thing for Jenkins? 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.
Sorry, I have never done anything for Jenkins bye Jochen
