jenkinsci / google-chat-notification-plugin

Google Chat Notification Jenkins Plugin to send build status
https://plugins.jenkins.io/google-chat-notification/
MIT License
39 stars 20 forks source link

:package: feat(Java): Update Java version to 11 #33

Closed regazzoj closed 1 year ago

regazzoj commented 1 year ago

Resolves #31

regazzoj commented 1 year ago

@lucaspanjer @cris @cowboyd @vbehar Hello, I am sorry to bother you but I did some changes in Jenkinsfile to use an newer JDK than 8. But it doesn't take effect because I don't have write access. Can you help me ?

regazzoj commented 1 year ago

@chiragnaik Let me know if you think some changes could be made.

gpflaum commented 1 year ago

The build is failing with this error: [2023-03-29T08:44:18.252Z] Caused by: java.lang.UnsupportedClassVersionError: org/jenkinsci/maven/plugins/hpi/ValidateMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Build log shows it is building with Java 8: [2023-03-29T08:43:48.131Z] Java version: 1.8.0_362, vendor: Temurin, runtime: C:\tools\jdk-8\jre

This blog says that error will happen if Jenkinsfile isn't updated to remove Java 8 configurations. You've done that, and I don't know what else needs to change.

regazzoj commented 1 year ago

The build is failing with this error: [2023-03-29T08:44:18.252Z] Caused by: java.lang.UnsupportedClassVersionError: org/jenkinsci/maven/plugins/hpi/ValidateMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Build log shows it is building with Java 8: [2023-03-29T08:43:48.131Z] Java version: 1.8.0_362, vendor: Temurin, runtime: C:\tools\jdk-8\jre

This blog says that error will happen if Jenkinsfile isn't updated to remove Java 8 configurations. You've done that, and I don't know what else needs to change.

I know, and it is because I don't have right access on this repo'.

In your link, there is a section talking about this problem =>

Note that changes to a plugin’s Jenkinsfile require write access to take effect in pull request builds. If you submit a pull request to a repository to which you do not have write access, any Jenkinsfile changes will be ignored with this message:
Jenkinsfile has been modified in an untrusted revision

Pending JENKINS-46795, the pull request will need to be refiled by someone with write access to ensure the Jenkinsfile changes take effect.
Ryudo302 commented 1 year ago

The build is failing with this error: [2023-03-29T08:44:18.252Z] Caused by: java.lang.UnsupportedClassVersionError: org/jenkinsci/maven/plugins/hpi/ValidateMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 Build log shows it is building with Java 8: [2023-03-29T08:43:48.131Z] Java version: 1.8.0_362, vendor: Temurin, runtime: C:\tools\jdk-8\jre This blog says that error will happen if Jenkinsfile isn't updated to remove Java 8 configurations. You've done that, and I don't know what else needs to change.

I know, and it is because I don't have right access on this repo'.

In your link, there is a section talking about this problem =>

Note that changes to a plugin’s Jenkinsfile require write access to take effect in pull request builds. If you submit a pull request to a repository to which you do not have write access, any Jenkinsfile changes will be ignored with this message:
Jenkinsfile has been modified in an untrusted revision

Pending JENKINS-46795, the pull request will need to be refiled by someone with write access to ensure the Jenkinsfile changes take effect.

@regazzoj, I tried to fix the problem with another commit in the Jenkinsfile, but apparently it had no effect. Should I close this PR and open another from your fork?

regazzoj commented 1 year ago

The build is failing with this error: [2023-03-29T08:44:18.252Z] Caused by: java.lang.UnsupportedClassVersionError: org/jenkinsci/maven/plugins/hpi/ValidateMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 Build log shows it is building with Java 8: [2023-03-29T08:43:48.131Z] Java version: 1.8.0_362, vendor: Temurin, runtime: C:\tools\jdk-8\jre This blog says that error will happen if Jenkinsfile isn't updated to remove Java 8 configurations. You've done that, and I don't know what else needs to change.

I know, and it is because I don't have right access on this repo'. In your link, there is a section talking about this problem =>

Note that changes to a plugin’s Jenkinsfile require write access to take effect in pull request builds. If you submit a pull request to a repository to which you do not have write access, any Jenkinsfile changes will be ignored with this message:
Jenkinsfile has been modified in an untrusted revision

Pending JENKINS-46795, the pull request will need to be refiled by someone with write access to ensure the Jenkinsfile changes take effect.

@regazzoj, I tried to fix the problem with another commit in the Jenkinsfile, but apparently it had no effect. Should I close this PR and open another from your fork?

@Ryudo302 I don't know... It might be a good try to give ! Thanks !

Ryudo302 commented 1 year ago

@regazzoj @gpflaum I think that I finally solved the problem :) I had to change the Jenkinsfile myself at a new branch created from master (called _masterjdk11). Then, I merged @regazzoj's branch into that branch. Finally, I merged the _masterjdk11 into master.