jenkinsci / groovy-events-listener-plugin

A Jenkins plugin, which executes groovy code when an event occurs.
https://plugins.jenkins.io/groovy-events-listener-plugin/
MIT License
36 stars 34 forks source link

enhancement: configurable test event #32

Closed Alyust closed 5 years ago

Alyust commented 7 years ago

Thank you guys for this cool plugin that let me not to write my own one! ;)

A tiny enhancement request: configurable test event instead of just 'RunListener.onStarted'

Jimilian commented 7 years ago

Yes, I agree that @nickgrealy did a great job :) Can you, please, explain why do you need this feature? Which User Scenario needs it?

p.s. I now that this feature can be implemented quite easy, but, unfortunately, current state of master blocks new releases (it breaks some feature that are really useful, i.e. ability to import any class from any plugin").

Alyust commented 7 years ago

I mean a line edit by the 'Test Groovy Code' button in plugin configuration section. It's content ('RunListener.onStarted' by default) goes to 'event' variable for running 'Groovy Code'. The scenario is testing: now I have to additionally handle 'RunListener.onStarted' event in my script when in fact it is supposed to only handle 'GlobalEventsPlugin.start'. And things might get hairier when there will be a need to handle job start also, or handle 2+ events in different ways.

Jimilian commented 7 years ago

I see. I think this button should fire GlobalEventsPlugin.start. Probably it was broken during some refactoring :)