Using the groovy script to retrieve the SHA, branch from the git repo, below is the scipt
def trigger_ref_tracks = "git ls-remote "+remoteUrl+"