简体   繁体   English

离线安装 Jenkins 插件

[英]Install Jenkins plugins Offline

I have a server running Jenkins which has not connectivity to the internet what so ever.我有一台运行 Jenkins 的服务器,它从来没有连接到互联网。 Not through a proxy, nothing.不是通过代理,什么都没有。

I have to install a bunch of plugins with all of their dependencies.我必须安装一堆插件及其所有依赖项。 What would be the simplest way of doing this?这样做的最简单方法是什么? It would take forever to manually download the .hpi files and install them...手动下载 .hpi 文件并安装它们需要很长时间......

Could I get creative and run Jenkins on my PC, install all the needed plugins and then copy that plugin folder to my server or something similar?我可以发挥创意并在我的 PC 上运行 Jenkins,安装所有需要的插件,然后将该插件文件夹复制到我的服务器或类似的东西吗?

Yes, that will work.是的,这会奏效。 Copy the content in your $JENKINS_HOME directory to the other Jenkins server.将 $JENKINS_HOME 目录中的内容复制到其他 Jenkins 服务器。 Plugins are stored in $JENKINS_HOME/plugins.插件存储在 $JENKINS_HOME/plugins 中。

It will work.它会起作用的。

The only thing that needs to be copied is the jpi/hpi files in the /plugins directory.唯一需要复制的是/plugins目录中的 jpi/hpi 文件。

Jenkins expands the plugins into same named directories within. Jenkins 将插件扩展为相同命名的目录。 Up restart, initial configuration files are created in the ${JENKINS_HOME} directory or added to config.xml .重新启动,初始配置文件在${JENKINS_HOME}目录中创建或添加到config.xml

If you don't perform any configuration locally you need not copy the configs.如果您不在本地执行任何配置,则无需复制配置。

Note, once installed locally (and restarted so operational), you can get a full list of plugins installed from the /systemInfo .请注意,一旦在本地安装(并重新启动以便运行),您可以从/systemInfo获取已安装插件的完整列表。 When installing a plugin it will download the latest listed but also the latest compatible dependencies, which may change at any time, so you may not get the same set 2nd time.安装插件时,它会下载最新列出的以及最新的兼容依赖项,这些依赖项可能随时更改,因此您可能不会第二次获得相同的设置。

You can use the list to know what's been updated from time to time, or just click Update All and then can find plugins (jpi/hpi) w/newer time stamps and copy those over later.您可以使用该列表来了解不时更新的内容,或者只需单击全部更新,然后可以找到带有较新时间戳的插件 (jpi/hpi) 并稍后将其复制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM