Optimize Jenkins version checking