Plugin Tutorial

This site is the new docs site currently being tested. For the actual docs in use please go to https://www.jenkins.io/doc.

Jenkins has a powerful extension and plugin system that allows developers to write plugins affecting nearly every aspect of Jenkins' behavior. Even a large part of "core" functionality is written in terms of extensions — extensions that could as well be contributed by plugins.

Some of the more obvious extension points include SCM implementations, integrating SCMs like Git, Subversion, or Perforce into Jenkins; build steps, providing everything from a convenient UI to configure build tools, to sending emails; or authentication realms, integrating Jenkins with Single Sign-On systems, or external user directories such as LDAP or Active Directory.

But it goes much further than that: Job types — Pipelines are implemented in plugins --; annotating console output or changelogs, for example to add links to referenced bugs in issue trackers; influencing how the Jenkins build queue prioritizes queue items and assigns builds to agents; or adding node monitors, the metric providers Jenkins regularly queries to determine the health of each build node can all be done using extensions in plugins. These are just a few examples of the extension points available in Jenkins.

This tutorial serves as a starting point for Jenkins plugin development: It explains how to prepare your build environment, how to create a plugin, and how to implement common functionality.