Interview Prep/Jenkins/Plugins, JCasC & Jenkins on Kubernetes

How do you manage plugins in a reproducible way?

IntermediateConceptPlugins, JCasC & Jenkins on Kubernetes
Answer

Pin plugins in plugins.txt and install them at image build time with jenkins-plugin-cli; never click "Install" on production.

# one plugin per line, name:version (exact versions come from the update center)
configuration-as-code:<pinned-version>
kubernetes:<pinned-version>
workflow-aggregator:<pinned-version>
FROM jenkins/jenkins:2.479.3-lts-jdk21
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN jenkins-plugin-cli --plugin-file /usr/share/jenkins/ref/plugins.txt

Use jenkins-plugin-cli --available-updates --output txt to produce an updated list for a PR.

All Jenkins questions Roadmap: Jenkins

More on Plugins, JCasC & Jenkins on Kubernetes