Managing Plugins in Jenkins

JenkinsBeginner
Practice Now

Introduction

Jenkins' true power lies in its extensibility, which is made possible by its vast ecosystem of plugins. Plugins can add new features, integrate with other tools, and enhance the user interface. Effectively managing these plugins is a critical skill for any Jenkins administrator.

In this lab, you will get hands-on experience with Jenkins administration and the complete lifecycle of Jenkins plugin management using the web interface. You will learn how to:

  • Browse and install new plugins from the Jenkins update center.
  • Check for and apply updates to existing plugins.
  • Uninstall plugins that are no longer needed.

A Jenkins instance is already running for you with the latest version, ready for plugin management.

Access Jenkins Web Interface

Before managing plugins, you need to access the Jenkins web interface. A Jenkins instance is already running with the latest version for you.

  1. Open the Firefox browser from the desktop interface. The browser will automatically open to http://localhost:8080, so you don't need to manually enter the URL. No login is required.
Jenkins dashboard

Your Jenkins instance is now ready for plugin management.

Browse and Install a Plugin

In this step, you will learn how to find and install a new plugin from the official Jenkins update center. We will install the Simple Theme Plugin, which allows for easy customization of the Jenkins UI appearance.

First, ensure you have accessed the Jenkins interface and logged in.

  1. From the main Jenkins dashboard, click the gear icon in the top right corner to access the settings panel.
  2. In the settings panel, click Plugins.
Jenkins Manage Jenkins page plugins tab
  1. You will be taken to the Plugin Manager. Click on the Available plugins tab to see all plugins that can be installed.
  2. In the search box on the top right, type Simple Theme to filter the list.
  3. In the search results, check the box next to Simple Theme and click Install.
Plugin Manager Available plugins tab

Jenkins will now download and install the plugin. You can monitor the progress on the installation page. Once it's finished, you will see a "Success" status next to the plugin name. The plugin is now installed and ready to be configured in a later step.

Jenkins plugin manager showing installed plugin

Check for Plugin Updates

Keeping plugins up-to-date is crucial for security, stability, and access to new features. In this step, you will learn how to check for and apply available updates through the Jenkins UI.

  1. Click the gear icon in the top right corner of the Jenkins dashboard to access the Jenkins management panel, then click Plugins to navigate back to the Plugin Manager.

  2. Click on the Updates tab. This tab lists all installed plugins that have a newer version available in the update center.

    Jenkins Plugins Updates tab showing available updates
  3. Observe the list of plugins. If any plugins have available updates, they will be listed here. The Jenkins instance in this lab may or may not have pending updates.

  4. If updates are available, you can select the plugins you wish to update by checking the boxes next to their names.

  5. Click the Update button at the bottom of the page. Jenkins will download and install the new versions. Some plugin updates may require a restart to take effect.

This process ensures your Jenkins environment remains current with the latest bug fixes and security patches from the plugin developers.

Uninstall a Plugin

In this final step, you will learn how to uninstall a plugin that is no longer needed. Removing unused plugins helps keep your Jenkins instance clean, secure, and performant. We will uninstall the Simple Theme Plugin.

  1. Click the gear icon in the top right corner of the Jenkins dashboard to access the Jenkins management panel, then click Plugins to navigate to the Plugin Manager.

  2. Click on the Installed plugins tab. This tab shows all plugins currently installed on your Jenkins instance.

  3. In the search box, type simple-theme-plugin to quickly find the plugin.

  4. Click the Uninstall button, which looks like an X icon, on the right side of the plugin's entry.

    Jenkins plugin manager showing uninstall button
  5. After you click uninstall, the plugin is marked for removal. Jenkins will display a message at the top of the page indicating that the plugin will be removed during the next restart.

Summary

Congratulations on completing this lab. You have successfully learned the essential skills for managing plugins in a Jenkins environment using the web interface.

In this lab, you practiced the three key aspects of Jenkins plugin lifecycle:

  • Installing: You searched for and installed a new plugin from the "Available plugins" tab.
  • Updating: You learned how to check for and apply updates from the "Updates" tab.
  • Uninstalling: You removed a plugin from the "Installed plugins" tab and understood the need for a restart.

Mastering these skills is fundamental to tailoring Jenkins to your specific needs and maintaining a healthy, secure, and efficient CI/CD server.