it should technically be possible to do it through the groovy console... but I would not try unless the bet was large enough to justify the considerable effort... especially when writing a plugin to do it will give you IDE autocompletion and would take *me* maybe 5 minutes compared with at least several hours if not days to do it through the groovy console... so yes, expect several orders of magnitude harder through the groovy console than writing a plugin
On 16 February 2017 at 12:04, Alexander Yustus <vre...@gmail.com> wrote: > Hi Stephen, > > thank you for the answer! > > Still, the question is: is there a way to do the thing (without plugin), > and how, if the answer is 'yes'? > > wbr, Alexander. > > On Wednesday, February 1, 2017 at 3:14:48 PM UTC+7, Stephen Connolly wrote: >> >> Writing a plugin would be easier than your suggested approach. >> >> Writing a plugin is not that hard. You'll just start with an empty plugin >> and add your extension class. >> >> On Wed 1 Feb 2017 at 03:55, Alexander Yustus <vre...@gmail.com> wrote: >> >>> Hi all, >>> >>> I want to implement the feature to prevent a Pipeline job from even >>> starting when there is no available executors with certain label. >>> I didn't found any plugins that do the exact thing, and I'm no java >>> developer, so writing my own plugin is what I really want to avoid ;) >>> >>> That said, is there a way to add an extension for QueueTaskDispatcher >>> via Groovy script, >>> for example, using Groovy Events Listener Plugin >>> <https://github.com/jenkinsci/groovy-events-listener-plugin>? >>> >>> thank you in advance, >>> Alexander. >>> >>> -- >>> 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/ms >>> gid/jenkinsci-users/50d9ea71-2acd-4bb6-96c5-a6d8554fe949% >>> 40googlegroups.com >>> <https://groups.google.com/d/msgid/jenkinsci-users/50d9ea71-2acd-4bb6-96c5-a6d8554fe949%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> Sent from my phone >> > -- > 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-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/e9061a87-8fbe-4e0a-b96a-c0b33d4cd203%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/e9061a87-8fbe-4e0a-b96a-c0b33d4cd203%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMzP3cAOoMp_8pGY-yNYDQ9s%2BwCzmcLDMv%3DkuqcZ%2B%2BoXPg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.