Do not checkout HEAD, checkout the Branch that is given in jenkins