如何从 Jenkins (Hudson) 卸载插件?

发布于 2024-10-16 15:53:09 字数 98 浏览 3 评论 0原文

我的 Jenkins 安装中有一些我不再需要的插件。我已经禁用了插件(并且我的构建仍然有效),并且我想完全删除插件。完全删除 Jenkins (Hudson) 插件的正确流程是什么?

I have a few plugins in my Jenkins installation which I no longer need. I've already disabled the plugins (and my build still work), and I'd like to remove the plugins completely. What is the right process for completely removing a Jenkins (Hudson) plugin?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

我不吻晚风 2024-10-23 15:53:09

正如 Jesse Glick 在他的回答中提到的,如果您使用的是 Jenkins 1.487 或更高版本,那么有一种本机方式可以卸载Jenkins UI 中的插件。有关详细信息,请参阅 JENKINS-3070

如果您使用的 Jenkins 版本早于 1.487,那么您可以尝试手动卸载该插件。正如一些人在评论中指出的那样,这可能在某些平台上不起作用(在这些情况下,请至少升级到 1.487,以便您可以使用官方卸载功能)。

要手动卸载插件,请停止 Hudson/Jenkins,转到 HUDSON_HOME/plugins 目录并删除 .hpi 文件和同名文件夹。因此,如果您要删除 CVS 插件,则需要删除 cvs.hpi 文件和 cvs 目录。

之后,重新启动 Hudson/Jenkins,该插件将不再存在。

As mentioned by Jesse Glick in his answer, if you are using Jenkins 1.487 or higher, then there is a native way to uninstall plugins in the Jenkins UI. See JENKINS-3070 for details.

If you are using a version of Jenkins earlier than 1.487, then you can try manually uninstalling the plugin. As some people point out in the comments, this may not work on some platforms (in those cases, upgrade to at least 1.487 so that you can use the official uninstall feature).

To manually uninstall a plugin, stop Hudson/Jenkins, go to your HUDSON_HOME/plugins directory and remove both the .hpi file and the folder with the same name. So, if you were going to remove the CVS plugin, you would remove both the cvs.hpi file and the cvs directory.

After that, restart Hudson/Jenkins and the plugin won't be there anymore.

南…巷孤猫 2024-10-23 15:53:09

Jenkins 1.487 添加了用于卸载插件的 UI: JENKINS-3070

Jenkins 1.487 adds a UI for uninstalling plugins: JENKINS-3070

活泼老夫 2024-10-23 15:53:09

删除.hpi 文件和相应的-plugin 目录将有效删除插件。

但是如果您在作业中配置了属于插件的参数,您的 Hudson 或 tomcat 日志可能包含 *CannotResolveClassException: hudson .plugins ... * 异常,因为它尝试加载插件。即使构建成功,这也可能导致构建失败。

要解决此问题,

  • 请转到作业配置并再次保存。 如果没有,这应该删除插件引用
  • ,进入 hudson 主作业目录并打开在以作业命名的文件夹下找到的 config.xml 并删除对插件的引用
  • 重新启动 hudson

Deleting the <plugin>.hpi file and corresponding <plugin>-plugin directory will effectively remove the plugin.

However, if you have configured parameters that belong to the plugin within your jobs your Hudson or tomcat logs may contain *CannotResolveClassException: hudson.plugins ... * exceptions because it attempts to load the plugin. This can result in build failures even if build is successful.

To fix that,

  • go to the job configuration and save it again. This should get rid of the plugin reference
  • if not, go into the hudson home jobs directory and open the config.xml found under the folder named after the job and remove the reference to the plugin
  • restart hudson
淡淡绿茶香 2024-10-23 15:53:09

Hudson 插件 解释了一些核心插件(“Tier 1”插件,因为它们被称为)是随 Hudson 本身一起提供的,因此我认为不能删除。

Hudson Plugins explains that some core plugins ("Tier 1" plugins, as they are called) are shipped with Hudson itself, and I assume cannot be deleted therefore.

沫尐诺 2024-10-23 15:53:09

您可以使用 Jenkins » 插件管理器禁用它。转到“已安装”选项卡,取消选中要卸载的插件并重新启动 Jenkins。虽然它不会卸载,但至少让它不会出现在配置页面中。

You can disable it using the Jenkins » Plugin Manager. Go to Installed tab and untick the plugins you want to uninstall and restart Jenkins. Though it does not unintall, at least keeps it away from appearing from configuration pages..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文