The main thing that makes Jenkins useful to any kind of project is its plugins. They are extensions beyond the core to give superpowers to your project on the right dose. That maintains a light Jenkins core and enable projects with Java, .NET, PHP, and many other types to be automated.
This article will cover how to identify plugins already installed and how to install new ones, search, update and so on. To install Jenkins, check the Getting Started PART 1. To understand the basics about the initially suggested plugins, check Getting Started PART 2.
Note that a new Jenkins version (2.89.2) is available but this article will keep the 2.73.3 version used in the previous articles.
Manage Plugins
After the login, on the left, there is a menu Manage Jenkins
. This is the place to set up any specific configuration to your Jenkins. If you are using the version 2.73.3 you may have noticed the big warning to update to the most recent Long-Term Support (LTS) version.
The menu Manage Plugins
will be the only place to care about in this article.
Installed Plugins
Following the standard installation, the Installed tab will have a bunch of plugins. If none of the suggested plugins were marked for installation, this tab will be empty.
Using Jenkins as a kind of Cron, scheduling tasks on background, no plugins will be necessary. But to create an automation to the simplest project you will need at least a version control system adapter as SVN or GIT to get your source code.
Not all plugins can be uninstalled directly (button placed on the last column). Some of them are dependencies to others so Jenkins will show a message for the ones that can’t be uninstalled. The same scenario is applied on disabling plugins (checkbox in the first column).
After uninstalling or disabling any plugin, Jenkins needs a restart to get things done. You may need to scroll down for a while to reach the end of the page due to the number of plugins. Make sure that no job is running at this moment.
Searching, Installing, Updating…
Installing and searching for plugins is a pretty simple task. Just need to access the Available tab. Jenkins will list all available plugins separated by session. The easy way is using the filter field. Type whatever you want and mark as many plugins as you want using the filter and Jenkins will keep everything you marked. When you are done, just click on Install without restart
to apply your needs. If you want deep details of each plugin, check official page of Jenkins Plugins.
Installing without restart is an old feature to avoid rebooting Jenkins so you can test new plugins faster (see this article from Kohsuke). But you can also restart if you prefer.
Considering that Jenkins community is quite active, plugins are receiving constant updates to improve features or to fix bugs. The tab Updates
will always warn you the plugins which need updates. Sometimes a Jenkins update will be asked for too. In the same way as uninstalling and disabling, updating plugins needs Jenkins restart to apply modifications.
Advanced
As the tab says, this is an Advanced topic that this article will not cover but basically, it enables to upload plugins, change the URL that Jenkins check for updates or configuring proxies.
What Next
Time to play! Dealing with Jenkins plugins is very important during the automation process. Many of your problems maybe already solved by plugins, you only need to install it. A very good example is checking out your project using GIT. There are no needs to create a Shell Script to clone it, just use the GIT plugin and earn many other features for free.
Here is a very simple action to put everything into practice:
- Install Jenkins without the suggested plugins (use docker to speed up the process if you want);
- Take one or two plugins. Use the list from Getting Started PART 2 article to help in the process;
- Install only the ones that make sense to your project (maybe you just need GIT or Subversion initially).
Done! You have just learned how to deal with any plugin on Jenkins. Now, in less than five minutes, you have the skill to search and install the desired plugin.
If you have any problem during this process send me an email by rcmouttinho at cyborgdeveloper dot tech.
Let’s automate!