Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins install plugins offline

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

like image 688
Robert van Gangelen Avatar asked Oct 09 '18 09:10

Robert van Gangelen


People also ask

Why Jenkins plugin installation failed?

Failing that, stop Jenkins, delete the /plugins directory and install them from scratch again. If the hpi/jpi package is corrupted, you may need to stop Jenkins, delete the package and the exploded directory inside plugins .

Where can I download Jenkins plugins?

Use https://updates.jenkins-ci.org/download/plugins/. Download it from this central update repository for Jenkins.


1 Answers

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.
like image 111
Quirino Gervacio Avatar answered Sep 22 '22 13:09

Quirino Gervacio