-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Stop using the "name" argument in the "install-plugin" CLI command #4123
Stop using the "name" argument in the "install-plugin" CLI command #4123
Conversation
As a side effect, this will take care of JENKINS-29065 in that "installation" of an invalid file won't work anymore, possibly breaking Jenkins. |
Confirmed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Test flake:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add checks for Runtime exceptions when reading the manifest (or just for the entire try/catch block)
It is rather a bug than a feature, but renaming PR retriggers the build more reliably than close/open |
Cleans up a longstanding UX regression from #2795: there is no good reason to require the
-name
option to theinstall-plugin
CLI command. At best it is a nuisance, and at worst it could mean data corruption from typos. So instead ofjava -jar …/jenkins-cli.jar -s http://jenkins/ install-plugin -name some-thing = < target/some-thing.hpi
you can just write
java -jar …/jenkins-cli.jar -s http://jenkins/ install-plugin = < target/some-thing.hpi
since the manifest header
already conveys this information.
Ditto for URL-based installation; the former code tried to parse out the short name from the URL path, which was pretty fragile. Now you can just
Also the download is now to a temporary file followed by an atomic move, which should reduce the chance of corrupted files breaking the installation.
Changelog entry:
-name
option to theinstall-plugin
command is no longer necessary nor honored.