[JENKINS-61046] - Allow plugins to force an update of the UpdateCenter (#4488)

* Allow plugins to force an update of the UpdateCenter

* Add javadoc to updateDirectlyNow

* [JENKINS-61046] introduce updateDirectlyNow() and updateDirectly()

@oleg-nenashev notes that the public API should not expose the security
option that is for testing.  Introduced updateDirectlyNow() as the new
API and updateDirectly() to have a mirror and deprecated
updateDirectly(boolean) as a consequence.

* fix javadoc grammar

fixes the grammar of the UpdateSite#updateDirectlyNow javadoc

Co-Authored-By: Raihaan Shouhell <raihaanhimself@gmail.com>

Co-authored-by: Raihaan Shouhell <raihaanhimself@gmail.com>
This commit is contained in:
James NordandRaihaan Shouhell authored and GitHub committed 2020-02-18 11:36:38 +01:00
1 parent 5e4eeb2ad2
commit b39ff9938a
3 files changed
+26 -3

No files matched your search

+1 -1
View File
@@ -1762,7 +1762,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
private FormValidation checkUpdatesServer() throws Exception {
for (UpdateSite site : Jenkins.get().getUpdateCenter().getSites()) {
FormValidation v = site.updateDirectlyNow(DownloadService.signatureCheck);
FormValidation v = site.updateDirectlyNow();
if (v.kind != FormValidation.Kind.OK) {
// Stop with an error
return v;