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

automatically delete the plugin that does not exist in the YAML file #1205

Closed
jaylenchen opened this issue Sep 7, 2021 · 6 comments
Closed

Comments

@jaylenchen
Copy link

Dependencies

plugins:

  • artifactId: configuration-as-code
    source:
    version: 1.52
  • artifactId: role-strategy
    source:
    version: 3.2.0
  • artifactId: workflow-aggregator
    source:
    version: 2.6
  • artifactId: git
    source:
    version: 4.8.2
  • artifactId: gitlab-plugin
    source:
    version: 1.5.20
  • artifactId: timestamper
    source:
    version: 1.13

Feature Request

When using jenkins-plugin-CLI to install a plug-in (in the form of a YAML file), you can automatically delete the plug-in that does not exist in the YAML file

@timja
Copy link
Member

timja commented Sep 7, 2021

the problem is that plugins have dependencies and dependencies can be added at any point as well.

If you go that approach there's a risk that plugins will fail to start when new mandatory dependencies are not present.

there's no option in jenkins-plugin-cli currently to not download dependencies as far as I know.

@jaylenchen
Copy link
Author

But I want to be able to manage the Jenkins plugin in a code management way. Now I use jenkins-plugin-CLI to install it. I can centrally manage and add new plugins, but I can't uninstall them at any time through the code. Installing but not uninstalling meant that my team had to figure out what we needed, the cost of trial and error was too high.

@timja timja transferred this issue from jenkinsci/docker Sep 8, 2021
@timja timja transferred this issue from jenkinsci/plugin-installation-manager-tool Sep 8, 2021
@timja
Copy link
Member

timja commented Sep 8, 2021

Should be do-able to clear the plugin folder when copying from the ref dir I think

@jaylenchen
Copy link
Author

Thank you for your reply ~ I still think that if the Jenkins plugin could be dynamically modified through YAML, it would make the use of Jenkins more management-friendly

Secondly, I now use Jenkins based on Kubernetes, and use CICD to write a Jenkinsfile for Jenkins to build his own image, then Kubernetes pull the new jenkins image to create a new jenkins service and kill the old jenkins service.

The reason for asking this question is to manage the Jenkins plugin installation in code form and the CASC plugin configuration management

I try to do this and it works to me . but when I update the yaml, I found that the plugin can install by yaml, can not uninstall .

@AtulRajput01
Copy link

i would like to work on it.

@dduportal
Copy link
Contributor

I'm going to close this issue as it's quite old and no comment.

@AtulRajput01 you can work on this but you have to describe what plan you have: there is no on with an idea so not sure it's an easy newcomer issue.

@jaylenchan sorry for the inconvenience. You might be interested in following #1531 which is specifically about describing how to uninstall a plugin.

Also, an easy solution for this problem is to mount a tmpfs volume in $JENKINS_HOME/plugins so no need to uninstall plugins!

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

No branches or pull requests

4 participants