@ Restricted ( NoExternalUse . class ) public synchronized void persistInstallStatus ( ) { List < UpdateCenterJob > jobs = getJobs ( ) ; boolean activeInstalls = false ; for ( UpdateCenterJob job : jobs ) { if ( job instanceof InstallationJob ) { InstallationJob installationJob = ( InstallationJob ) job ; if ( ! installationJob . status . isSuccess ( ) ) { activeInstalls = true ; } } } if ( activeInstalls ) { InstallUtil . persistInstallStatus ( jobs ) ; // save this info } else { InstallUtil . clearInstallStatus ( ) ; // clear this info } }
Called to persist the currently installing plugin states . This allows us to support install resume if Jenkins is restarted while plugins are being installed .