如何在Java 8中继续使用Jenkins

kuuvgm7e  于 2022-11-01  发布在  Jenkins
关注(0)|答案(1)|浏览(246)

发布2.346.x版本后,Jenkins强迫我们升级到Java 11。然而,我们公司的政策要求我们在所有项目中坚持使用Java8,无论情况如何。(明显的原因是预算)。
我知道我们仍然可以下载和安装旧版本的Jenkins。这里的问题是,在某个时间点之后,大多数插件停止支持旧版本的Jenkins。现在我既不能升级到最新版本的Jenkins,也不能继续使用旧版本的插件。
因此,问题来了-有没有办法继续使用Java8兼容的Jenkins和所有的插件?

uqzxnwby

uqzxnwby1#

如果您使用的是Debian或Ubuntu,您可以在APT configuration中将软件包固定到所选版本。

root@debian:~# cat /etc/apt/preferences.d/jenkins
Package: jenkins
Pin: version 2.346
Pin-Priority: 1000

root@debian:~# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@debian:~# rm /etc/apt/preferences.d/jenkins

root@debian:~# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  jenkins
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/92.9 MB of archives.
After this operation, 2,204 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
root@debian:~#

相关问题