-
Notifications
You must be signed in to change notification settings - Fork 18
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
[JENKINS-27734] Shelve any kind of item #14
Conversation
What's the status of this? Shelving jobs and folders would greatly improve automatic job cleanup by the jobdsl plugin (automatically shelving unused jobs is a bit safer than automatically deleting them entirely...). |
@cpfeiffer I didn't have a heavily used Jenkins instance at hand to test well this change. The change itself allows to shelve almost anything so it's quite a big change, I'd really like to have it tested properly. In case you are interested, I can refresh the PR, merge it and release a beta version of the plugin with the fix. |
@PierreBtz that would be great! From looking at the code, I'm wondering if the changes to ShelveProjectTask (e.g. 07ba880#diff-97084c54679364747fdb01425511447bR35 etc.) might have a negative effect. Maybe check for Besides that I could imagine issues with nested items, e.g. jobs nested in folders. "Someone" might need to take care that shelving a toplevel folder will not interfere the shelving of a nested job (if shelving can run concurrently, that is). |
Not only buildable ones (Freestyles, Pipelines) but also Folders for instance.
07ba880
to
349a067
Compare
@cpfeiffer I rebased the branch and followed your suggestion. Did some test and I'm happy. Once the CI build passes, I'll make an alpha release.
That is a good point and something that indeed might happen. Something else is that there is currently no possible reconciliation if somebody unshelve a folder that would partially exist. I feel I'm opening a door to potential conflicting situations here, that is why I'm releasing an alpha version of the plugin to collect more use cases before making the feature generally available. |
Version 3.0-alpha-1 released in the experimental update center. See here to retrieve a plugin from it: https://jenkins.io/doc/developer/publishing/releasing-experimental-updates/ |
Awesome, will try it! |
My simple tests withs shelving and unshelving of projects and folders on different levels were successful. 👍 |
@cpfeiffer any extended feedback on real case usage of this feature? I'd like to cut a new official (non beta) release of the plugin with it, having some feedback would help me determine if the feature is safe enough. |
Thanks for asking. We're using it successfully since then, without any issues at all. We don't (need to) unshelve often but everything we did was successful. So from my side this is a 👍 |
@cpfeiffer I just released version 3.0 with this new feature: https://github.com/jenkinsci/shelve-project-plugin/releases/tag/shelve-project-plugin-3.0. Thanks again for your feedback! |
Not only buildable ones (Freestyles, Pipelines) but also Folders
for instance.
NB only line 70 changed in
UnshelveProjectExecutable
, rest is due to a wrong (CRLF) line ending on the previous version.CC @reviewbybees