public HudsonUpgradeJob getHudsonJob ( ) { List < UpdateCenterJob > jobList = getJobs ( ) ; Collections . reverse ( jobList ) ; for ( UpdateCenterJob job : jobList ) if ( job instanceof HudsonUpgradeJob ) return ( HudsonUpgradeJob ) job ; return null ; }
Returns latest Jenkins upgrade job .