The Plugin Manager

Plugins extend Jenkins with new features; the Plugin Manager is where you install and update them.

Almost every capability in Jenkins — Git, Docker, pipelines, notifications — comes from a plugin. There are over 1,800 available. The Plugin Manager is where you manage them.

Where to find it

Manage Jenkins > Plugins. It has tabs for:

  • Available plugins — search and install new ones.
  • Installed plugins — see and remove what you have.
  • Updates — apply new versions.

Keeping plugins healthy

  • Update regularly for security fixes.
  • Remove plugins you no longer use.
  • Test updates on a staging Jenkins before production if you can.

Example

Example · bash
# Plugins can also be installed from the command line
# using the Jenkins CLI or by listing them in a file
# for automated (Docker) setups:

# plugins.txt
git
workflow-aggregator
docker-workflow
credentials-binding
blueocean

# Then in a Dockerfile:
# RUN jenkins-plugin-cli --plugin-file /plugins.txt

When to use it

  • A DevOps engineer installs the Blue Ocean plugin through the Plugin Manager to get a visual pipeline editor.
  • A team pins all plugins to specific versions in a plugins.txt file so every Jenkins upgrade is reproducible.
  • A security team regularly checks the Plugin Manager update center for CVE-flagged plugins and applies patches.

More examples

Install plugin via Jenkins CLI

Installs the Blue Ocean and Pipeline Stage View plugins and restarts Jenkins via the CLI.

Example · bash
java -jar jenkins-cli.jar \
  -s http://localhost:8080 \
  -auth admin:$TOKEN \
  install-plugin \
  blueocean pipeline-stage-view --restart

plugins.txt for Docker image

A plugins.txt file used with jenkins-plugin-cli to pre-install exact plugin versions in a custom Jenkins image.

Example · bash
# plugins.txt pinned versions
git:5.2.2
workflow-aggregator:596.v8c21c963d92d
credentials:1311.vcf0a_900b_37c2
docker-workflow:563.vd5d2e5c4007f
blueocean:1.27.14

Install plugins from plugins.txt in Docker

Builds a custom Jenkins Docker image with all plugins pre-installed from a versioned plugins.txt file.

Example · dockerfile
FROM jenkins/jenkins:lts

COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN jenkins-plugin-cli --plugin-file \
    /usr/share/jenkins/ref/plugins.txt

Discussion

  • Be the first to comment on this lesson.