Updated CloudBees with Jono's changes and official way to get port number.