Status: Closed (View Workflow)
It's very possible that someone will want to bring in an external library, which we're unfamiliar with or just don't include. If they could add an @Grab to get it, it's add up a lot of functionality.
Comments / References from Original Github Issue
andrewharmellaw referenced this issue 8 months ago
Issue #18: Facilitate DSL Extensions
andrewharmellaw commented 8 months ago
Sounds great. This is anther way of looking at the issue I created (#18). This is more idiomatic than mine though. I'll close it.
- is related to
JENKINS-15512 HTTPBuilder for Groovy Post Build
JENKINS-42307 Please add general support for Grape (and ivy)
Let's leave this open until after it's documented. I just started using this feature today, so give me a few days to clean it up to be used as an example. Thanks for adding the page.
Any indication of which version of Jenkins this is/will be available ?
Also, does it matter whether the @Grab annotation is used from within the System console or a Groovy build step ?
This ticket has been for the Job DSL plugin. For Grab support in the system console or the Groovy plugin you need to open another ticket.
The Job DSL plugin has the Grab support for quite some time and works with Jenkins 1.480 or later. In principle, you can use the Job DSL plugin as a replacement for system Groovy build step provided by the Groovy plugin.
Thanks for the quick reply. I had missed this ticket was indeed for the job-dsl-plugin. I will try what you suggest. Cheers!
Done. I'm giving 10 hours to see if anyone else wants to have a look too. Great work. Do you want to put something up on the wiki too? I created a "User Power Moves" page yesterday where this (using @Grab) would fit nicely...