Technology Encyclopedia Home >What are the ways to install Jenkins plugins?

What are the ways to install Jenkins plugins?

There are several ways to install Jenkins plugins:

  1. Through the Jenkins UI:
  • Navigate to Manage Jenkins > Manage Plugins.
  • Go to the Available tab.
  • Search for the plugin you want.
  • Check the box next to the plugin and click Install without restart.

Example: To install the "Git" plugin, you would search for "Git" in the Available tab and follow the on-screen instructions.

  1. Using the Jenkins CLI:
  • Open a terminal or command prompt.
  • Use the Jenkins CLI command install-plugin <plugin-name>.

Example: To install the "Docker" plugin via CLI, you would run jenkins-cli install-plugin docker.

  1. Manual Installation:
  • Download the .hpi or .jpi file of the plugin from the Jenkins Plugin website.
  • Go to Manage Jenkins > Manage Plugins > Advanced.
  • Under the Upload Plugin section, upload the downloaded plugin file.

Example: If you download the "Kubernetes" plugin, you would navigate to the Advanced tab in the Plugin Manager and upload the .hpi file.

  1. Using a Configuration Management Tool:
  • Tools like Ansible, Puppet, or Chef can be used to automate the installation of Jenkins plugins.
  • These tools can be configured to download and install plugins directly on the Jenkins server.

Example: With Ansible, you might write a playbook that installs the "Pipeline" plugin by specifying the plugin name and version.

For cloud-based Jenkins deployments, consider using managed services that offer automated plugin management, such as Tencent Cloud's Cloud Jenkins service, which simplifies the setup and maintenance of Jenkins environments.