One of the main things that put Jenkins as one of the top automation tools in the industry is the plugin flexibilities. Plugins create the perfect scenario to fulfill most of your needs or all of them.
Knowing how to get the best of the initially recommended plugins will make all the difference in your automation journey. Many of them represent standard Jenkins behaviors and are also maintained and used at CloudBees Jenkins Enterprise (CJE) version. But you have the freedom to select what fits your project best.
If you have just arrived at this post you may want to read the first part showing how to install Jenkins.
Getting Started
Jenkins has an official site to search for plugins where some key information is shown.
- Minimum required version to install.
- Maintainers, the magicians behind the plugin. You can also be a maintainer fixing bugs, writing documentation and suggesting improvements.
- Dependencies, the reason for Jenkins success. Think of a big puzzle using other existing pieces to create a new feature.
- The changelog shows how active this plugin is on fixing bugs and being constantly updated.
The plugin page is the best place to understand how useful the plugin is. From how many installations it has per month, to notes warning that the plugin became obsolete at some point in your lifetime.
Suggested Plugins
Be aware that the initial manual plugin selection will not show the full list but you will be able to add whichever you want using the Plugin Manager after the installation.
For didactic reasons, let’s cover the same topics used by Suggested Plugins page following the same order as they are suggested. So you will feel confident enough looking at the plugin installation. At the moment of this installation, version 2.73.3, there are 20 recommendations.
Organization and Administration
- Folders: Very useful depending on your project size allowing folder creation to better organize your jobs.
- OWASP Markup Formatter: Allow HTML content at text fields taking care of unsafe tags like scripts. The standard format is plain text. You can change this configuration at
Manage Jenkins > Configure Global Security > Markup Formatter
. OWASP = Open Web Application Security Project.
Build Features
- Build Timeout: Abort a build if it’s taking too long to execute. On the job configuration page, check the option
Abort the build if it’s stuck
atBuild Environment
section. - Credentials Binding: An easy way to handle secrets on a job accessing them by an environment variable during the build.
- Timestamper: An option that
add timestamps to the Console Output
at theBuild Environment
section on a job configuration. - Workspace Cleanup: Like the name says, enables a workspace cleanup before and/or after the build is done.
Other cool ones not suggested:
- Rebuilder: Useful to rebuild parameterized jobs filling with the previously used values.
- SSH Agent: Allows adding Secure Shell (SSH) credentials used on builds.
- embeddable-build-status: This is for the badge lovers. Creates a fixed URL exposing the latest job status with an embeddable build status icon.
Build Tools
This section is very flexible to unmark suggested plugins or mark new ones like .NET or NodeJS support according to your project needs.
- Ant: Adds Apache Ant support allowing to invoke Ant targets at
Build
section. - Gradle: Adds Gradle support to Jenkins allowing the build to run Gradle scripts.
Build Analysis and Reporting
Nothing is marked as suggested but it is possible to configure Checkstyle, Cobertura, JUnit and many other tools.
Pipelines and Continuous Delivery
- Pipeline: Orchestrate automation workflows regardless its complexity. Check the documentation for more details.
- GitHub Branch Source: Import repositories from an organization or user and expect a
Jenkinsfile
in the root directory of the project or branch. - Pipeline: GitHub Groovy Libraries: Allows Pipeline Groovy libraries to be loaded on the fly from GitHub.
- Pipeline: Stage View: A pretty view to see the progress of each stage.
Another useful plugin not suggested is Copy Artifact. It enables a build step to copy an artifact from other projects (jobs).
Source Code Management
This section basically handles the checkout of your project from various Source Control Management (SCM) like Bitbucket, GitHub, GitLab, and even the old CVS. Jenkins suggests only Git and Apache Subversion initially.
Distributed Builds
This is a more advanced section when the basics of Jenkins is not enough to your project. SSH Slaves is suggested to access a slave using SSH with Java implementation. And an even more specific that is not suggested is the Windows Slaves that allows connecting to Windows machines.
User Management and Security
- Matrix Authorization Strategy: Enables a deep security level control to the Jenkins administrator of each available task. Allows enabling, disabling, and configuring key features of Jenkins.
- PAM Authentication: Adds the Pluggable Authentication Module (PAM) support. “It is a mechanism to integrate multiple low-level authentication schemes into a high-level application programming interface (API)” – (Wikipedia).
- LDAP: Adds the Lightweight Directory Access Protocol (LDAP) support, a standard application protocol for accessing directories over the Internet.
Another great plugin not suggested is Role-based Authorization Strategy. It is very useful for companies that handle the access by levels of roles.
Notifications and Publishing
Email Extension and Mailer improve in many aspects Jenkins email notification like customizing triggers and body mail content.
The plugins Publish Over SSH and SSH are not suggested but they also help to copy files and to execute scripts over SSH protocol.
What Next
Congratulations! It’s time to take a ride on Plugin Manager to look and improve your Jenkins plugins. Access this page using the menu Manage Jenkins > Manage Plugins
. From there you will be able to update, install and check what is already installed. You will also notice that there are more than the twenty suggested plugins installed due to their needed dependencies.
Out next article will cover the last part to reach the basic automation of your project, the Jenkins’ jobs.
Let’s automate!