How to install a plugin in Jenkins manually

后端 未结 12 536
你的背包
你的背包 2020-11-29 17:06

Installing a plugin from the Update center results in:

Checking internet connectivity Failed to connect to http://www.google.com/. Perhaps you need

相关标签:
12条回答
  • 2020-11-29 17:40

    In my case, I needed to install a plugin to an offline build server that's running a Windows Server (version won't matter here). I already installed Jenkins on my laptop to test out changes in advance and it is running on localhost:8080 as a windows service.

    So if you are willing to take the time to setup Jenkins on a machine with Internet connection and carry these changes to the offline server Jenkins (it works, confirmed by me!), these are steps you could follow:

    • Jenkins on my laptop: Open up Jenkins, http://localhost:8080
    • Navigator: Manage Jenkins | Download plugin without install option
    • Windows Explorer: Copy the downloaded plugin file that is located at "c:\program files (x86)\Jenkins\plugins" folder (i.e. role-strategy.jpi)
    • Paste it into a shared folder in the offline server
    • Stop the Jenkins Service (Offline Server Jenkins) through Component Services, Jenkins Service
    • Copy the plugin file (i.e. role-strategy.jpi) into "c:\program files (x86)\Jenkins\plugins" folder on the (Offline Jenkins) server
    • Restart Jenkins and voila! It should be installed.
    0 讨论(0)
  • 2020-11-29 17:49

    The accepted answer is accurate, but make sure that you also install all necessary dependencies as well. Installing using the CLI or web seems to take care of this, but my plugins were not showing up in the browser or using java -jar jenkins-cli.jar -s http://localhost:8080 list-plugins until I also installed the dependencies.

    0 讨论(0)
  • 2020-11-29 17:50

    Update for Docker: use the install-plugins.sh script. It takes a list of plugin names minus the '-plugin' extension. See the description here.

    install-plugins.sh replaces the deprecated plugins.sh which now warns :

    WARN: plugins.sh is deprecated, please switch to install-plugins.sh

    To use a plugins.txt as per plugins.sh see this issue and this workaround:

    RUN /usr/local/bin/install-plugins.sh $(cat /usr/share/jenkins/plugins.txt | tr '\n' ' ')

    0 讨论(0)
  • 2020-11-29 17:50

    Sometimes when you download plugins you may get (.zip) files then just rename with (.hpi) and then extract all the plugins and move to <jenkinsHome>/plugins/ directory.

    0 讨论(0)
  • 2020-11-29 17:51

    Yes, you can. Download the plugin (*.hpi file) and put it in the following directory:

    <jenkinsHome>/plugins/
    

    Afterwards you will need to restart Jenkins.

    0 讨论(0)
  • 2020-11-29 17:53

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

    0 讨论(0)
提交回复
热议问题