NPE when scanning a merge branch in Jenkins

This works to fix the issue if run between the custom checkout and the sh that runs sonar-scanner:

env.GIT_COMMIT = sh 'git rev-parse HEAD'