Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to skip install of plugins #1065

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LEDfan
Copy link

@LEDfan LEDfan commented Sep 30, 2024

Hi, first of all thanks for maintaining this operator! Unfortunately, I'm running into some issues with the operator managing the installation of plugins. I experienced multiple times that when the Jenkins pods restart, it fails to start up because the specified plugin versions are incompatible (although they were compatible when Jenkins was initially deployed). In addition it's sometimes difficult to update Jenkins, because of the plugin versions. I also need to deploy Jenkins in an environment where it's not allowed to download the plugins from the internet.

Therefore I implemented an option to completely skip the installation of plugins. This requires using a custom docker image that at least includes the base plugins. The startup time of Jenkins is also heavily reduced by this.

See jenkins-infra/helpdesk#3930 (comment) and #867

Changes

  • add option to skip install of plugins

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

I didn't add tests, since I think there are currently no tests for generating the configmap.
If you like this feature and intend to accept it, I will write some docs.

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS.

Release Notes

- add option to skip install of plugins

Example image

I tested this using:

FROM jenkins/jenkins:2.452.3-lts-jdk17

COPY ./plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN jenkins-plugin-cli \
  --plugin-file /usr/share/jenkins/ref/plugins.txt \
  --verbose
configuration-as-code:1836.vccda_4a_122a_a_e
git:5.3.0
job-dsl:1.87
kubernetes:4253.v7700d91739e5
kubernetes-credentials-provider:1.262.v2670ef7ea_0c5
workflow-job:1400.v7fd111b_ec82f
workflow-aggregator:600.vb_57cdd26fdd7

@brokenpip3
Copy link
Collaborator

brokenpip3 commented Oct 1, 2024

ehi @LEDfan thanks a lot for deciding to make a contribution :)

First of all the tests failure are not related to your changes, I need to fix them in master so you can merge those fixes.

Anyway about the PR I'm ok to pursuit this change, we may need to:

  1. modify the helm chart as well
  2. add a mechanism that will check if the 5 base plugins that we need to run jenkins are present in the base image that we are passing with SkipPlugins set to true. Can even be a bash script in script_configmap.go
  3. add a test with this new scenario, this is something I can take care of.

wdyt?

I'm running into some issues with the operator managing the installation of plugins. I experienced multiple times that when the Jenkins pods restart, it fails to start up because the specified plugin versions are incompatible (although they were compatible when Jenkins was initially deployed)

for these issues you can use latestPlugin set to false

@brokenpip3 brokenpip3 self-requested a review as a code owner October 20, 2024 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants