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

Add ExecutorListener to handle task execution events #96

Closed lpb1 closed 7 months ago

lpb1 commented 7 months ago

Fixes #95 Add ExecutorListener to handle task execution events

Changes proposed

    modified:   src/main/groovy/org/jenkinsci/plugins/globalEventsPlugin/Event.java
    new file:   src/main/groovy/org/jenkinsci/plugins/globalEventsPlugin/GlobalExecutorListener.java
    modified:   src/main/resources/org/jenkinsci/plugins/globalEventsPlugin/GlobalEventsPlugin/global.jelly
    modified:   src/main/resources/org/jenkinsci/plugins/globalEventsPlugin/GlobalEventsPlugin/help-onEventGroovyCode.html
    new file:   src/main/site/examples/4_UseExecutorListener.groovy
    modified:   src/test/groovy/org/jenkinsci/plugins/globalEventsPlugin/acceptance/StepDefs.groovy
    modified:   src/test/resources/org/jenkinsci/plugins/globalEventsPlugin/acceptance/Groovy Script - Runtime.feature

Checklist

Notify

@raymondwu1

zhan9san commented 7 months ago

@nickgrealy

Thanks for your great work on this project.

Could you please help review this PR when you are free?

It can help us get more detailed infomation of Jenkins jobs

raymondwu1 commented 7 months ago

lgtm

AlexZolotarenko commented 7 months ago

If ExecutorListener is to be added, why not implement all events that it has to offer? At the moment 'taskAccepted' is not implemented

zhan9san commented 7 months ago

@raymondwu1 @AlexZolotarenko

Thanks for your review.

It would be easier to review a small change.

As for the rest, they can be added in another small PR if needed.

Let me know if you have any concern.