Interview Prep/Jenkins/Platform: plugins, JCasC & Kubernetes agents

You inherit a controller with 230 plugins, half unused, on a version two LTS lines behind. Plan the cleanup and upgrade.

AdvancedScenarioPlatform: plugins, JCasC & Kubernetes agents
Answer

Situation read → Large surface, upgrade risk compounds with plugin count.

What I'd do →

  1. Export the plugin list and current config (/configuration-as-code/viewExport), back up JENKINS_HOME.
  2. Find usage with the Plugin Usage plugin and by grepping jobs/*/config.xml and Jenkinsfiles for steps; mark unused plugins (dependencies of used ones stay).
  3. Clone production to staging, remove unused plugins there, check for "old data" and broken jobs.
  4. Build an image with the target LTS and jenkins-plugin-cli --jenkins-version <target> --available-updates.
  5. Upgrade staging, run smoke pipelines, then production with quiet-down and a rollback image.
  6. Move everything into plugins.txt and JCasC so this never accumulates again.

Why → Removing plugins before upgrading reduces conflicts and testing scope.

Interview tip → Mention the Java 17 requirement as a classic upgrade blocker.

All Jenkins questions Roadmap: Jenkins

More on Platform: plugins, JCasC & Kubernetes agents