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

Use Java 8 #42

Closed darxriggs closed 5 years ago

darxriggs commented 5 years ago

Java 7 is end of life since many years. Jenkins 2.60.1 is the first Jenkins version requring Java 8. For more details see https://jenkins.io/changelog-stable/#v2.60.1 Use 2.60.3 to get at least some more bug fixes.

@nickgrealy @markyjackson-taulia

darxriggs commented 5 years ago

@nickgrealy / @markyjackson-taulia ping

markjacksonfishing commented 5 years ago

@darxriggs sorry for letting this PR slip. I will get this tested this weekend and if there are not problems I will merge this and get a release out

darxriggs commented 5 years ago

I also plan to have a look at JCasC compatibility (JENKINS-53571). Therefore I suggest to wait with the release.

darxriggs commented 5 years ago

I already get the following error on the master branch at the beginning of the integration tests when running ./gradlew check. So that's not new in this pull request.

Failed to initialize Jenkins
hudson.util.HudsonFailedToLoad: java.lang.NullPointerException
    at hudson.WebAppMain$3.run(WebAppMain.java:244)
Caused by: java.lang.NullPointerException
    at org.jenkinsci.plugins.globalEventsPlugin.GlobalComputerListener.getParentPluginDescriptor(GlobalComputerListener.java:33)
    at org.jenkinsci.plugins.globalEventsPlugin.GlobalComputerListener.onOnline(GlobalComputerListener.java:47)
    at jenkins.model.Jenkins.<init>(Jenkins.java:915)
    at hudson.model.Hudson.<init>(Hudson.java:85)
    at hudson.model.Hudson.<init>(Hudson.java:81)
    at hudson.WebAppMain$3.run(WebAppMain.java:227)
darxriggs commented 5 years ago

On this pull request the seen NPE doesn't hinder the integration tests to run. The "only" problem is that one test reports a small difference - see the last characters.

org.jenkinsci.plugins.globalEventsPlugin.integration.IntegrationTest > issues21 FAILED

Execution completed successfully!>>> Executing groovy script - parameters: [env, run, jenkins, log, event, context]Hello World!>>> Ignoring response - value is null or not a Map. response=null>>> Executing groovy script completed successfully. totalDurationMillis='X',executionDurationMillis='X',synchronizationMillis='-1'
Execution completed successfully!>>> Executing groovy script - parameters: [env, run, jenkins, log, event, context]Hello World!>>> Ignoring response - value is null or not a Map. response=null>>> Executing groovy script completed successfully. totalDurationMillis='X',executionDurationMillis='X',synchronizationMillis='X'

This was an issue in the time calculation in GlobalEventsPlugin which I also fixed now.

darxriggs commented 5 years ago

@markyjackson-taulia ping