jenkinsci / build-name-setter-plugin

Build Name Setter Plugin for Jenkins CI
https://plugins.jenkins.io/build-name-setter/
MIT License
34 stars 51 forks source link

Refresh plugin 2023 #73

Closed jonesbusy closed 1 year ago

jonesbusy commented 1 year ago

Refresh the plugin pom for 2023 (bom, incremental, modern Jenkins etc...)

If ok for you @damianszczepanik I can also be maintainer of this plugin to keep it up-to-date.

jonesbusy commented 1 year ago

Build is failing because I'm not maintainer of this project and cannot update Jenkinsfile

damianszczepanik commented 1 year ago

Build is failing because I'm not maintainer of this project and cannot update Jenkinsfile

I don't think this is true reason of the failure:

[2023-02-10T17:18:51.685Z] 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

jonesbusy commented 1 year ago

Build is failing because I'm not maintainer of this project and cannot update Jenkinsfile

I don't think this is true reason of the failure:

[2023-02-10T17:18:51.685Z] 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

It is actually. Because current Jenkins Core doesn't support JDK 8 anymore. We must compile with minimum JDK 11.

damianszczepanik commented 1 year ago

I'm not surprising about that because of https://www.jenkins.io/blog/2022/06/28/require-java-11/

The question is why your PR does not work with new JDK ?

jonesbusy commented 1 year ago

It works with JDK 11 and JDK 17. But not 8.

Old Jenkinsfile is still used. An administrator should restart the build or a maintainer should commit only the Jenkinsfile.

Error cannot be more clear

18:16:54  Obtained Jenkinsfile from 20885ec475a859ef50e2c2156a260ae183b1dced
18:16:54  ‘Jenkinsfile’ has been modified in an untrusted revision
damianszczepanik commented 1 year ago

This is not problem with Jenkinsfile - I have used yours and it builds against configurations which you declared https://github.com/jenkinsci/build-name-setter-plugin/pull/74/checks?check_run_id=11340140063

So the problem is with other dependencies which come with your PR

jonesbusy commented 1 year ago

Superseded by https://github.com/jenkinsci/build-name-setter-plugin/pull/76