Jenkins install plugins offline
Asked Answered
P

3

8

Installed Jenkins on a Linux server and want to install some plugins manually.

I want to install Blue Ocean and Artifactory.

For both plugins I downloaded the hpi file and tried to install it, but I get a lot of dependency errors.

Do I now have to install those dependencies manually as well? or is there a better way to do this?

I tried to install one of those dependency and that one also had some dependency errors as well :-(

The Linux server is not able to access the internet.

Thanks!

Robert

Pappus answered 9/10, 2018 at 9:4 Comment(0)
A
8

Same case here. Our Jenkins is setup in OpenShift which is not allowed to connect to the Internet. Downloading a plugin 1-by-1 is tiresome. Not to mention that each plugins have its own dependencies that needs to be downloaded as well.

Here's what you would do...

  1. Run a Jenkins locally in a machine that can download plugins.
  2. Download and update all the plugins you want using the Update Center.
  3. Go %JENKINS_HOME%/plugins directory. Inside this folder you would see *.jpi. These are your plugins. Its dependencies will be downloaded as well.
  4. Rename it to *.hpi then keep it in some directory.

To test...

  1. In your local Jenkins delete everything in %JENKINS_HOME%/plugins directory then put all *.hpi in this directory.
  2. Restart your local Jenkins.
  3. Verify if the plugins you require are installed and updated.
Akilahakili answered 24/11, 2018 at 11:17 Comment(2)
Can you explain what the rename step is for?Stephi
@Ya Jenkins renames the installed plugins to the extension .jpi to know which plugin was already installed. If you rename it to .hpi it will try to install them after the restart.Cobelligerent
D
7

You are correct that BlueOcean has a lot of dependencies.

Given you are not able to connect to the internet you will need to download all 21 BlueOcean related hpi files and upload them from the Manage Jenkins > Manage Plugins > Advanced tab.

Alternatively, if you have access to the server that your Jenkins instance is running on you can copy the hpi files into the %JENKINS_HOME%/plugins folder. The corresponding directories (exploded from the hpi, which is just a zip file) will be created on Jenkins restart.

The easiest way to acquire all 21 plugin files is to open The Jenkins plugin page and search for blueocean. Download the same numbered version of all 21 and upload them one by one. Order shouldn't be an issue. As long as they are all present on restart the dependencies will resolve.

Same process goes for any other plugin. If you're able to get the machine connected to the internet it will make the process a lot simpler as you will be able to use the update center, which manages dependencies and update notifications.

Disturbance answered 11/10, 2018 at 2:1 Comment(0)
E
0
  1. download jenkins-plugin-manager. (https://github.com/jenkinsci/plugin-installation-manager-tool/blob/master/README.md)
  2. download the plugin with dependences.
java -jar jenkins-plugin-manager-2.12.11.jar  -d jenkins_plugins --plugins git:5.0.0
  1. copy .jpi files to %JENKINS_HOME%/plugins folder.
  2. reboot jenkins.
Eleaseeleatic answered 12/4, 2023 at 13:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.