On PR update, the second build of master/nuxeo-master-sonar job fails with an error on the Git rev-parse command, then an NPE is raised at the very end.
[Pipeline] properties [Pipeline] node Running on Docker-slave-5864f4b7119f-qa-ovh01.nuxeo.com in /opt/jenkins/workspace/_nuxeo-master-sonar_PR-2351-KWEA4QQ2JSNDIURDQ4ZFRKNYOG34BVR6XJTLGMCB5SQ5BVZ7LXHQ [Pipeline] { [Pipeline] echo Using BRANCH_NAME parameter: PR-2351 [Pipeline] echo Using CHANGE_TARGET parameter: master [Pipeline] echo Testing branch 'PR-2351' with parent branch 'master' [Pipeline] tool [Pipeline] tool [Pipeline] tool [Pipeline] timeout Timeout set to expire in 5 hr 0 min [Pipeline] { [Pipeline] timestamps [Pipeline] { [Pipeline] stage [Pipeline] { (clone) [Pipeline] sh [_nuxeo-master-sonar_PR-2351-KWEA4QQ2JSNDIURDQ4ZFRKNYOG34BVR6XJTLGMCB5SQ5BVZ7LXHQ] Running shell script + git ls-remote --exit-code git://github.com/nuxeo/nuxeo.git master 46d37de3c8e6a6ef8c472ade46e42cc60fbe3206 refs/heads/master [Pipeline] git Cloning the remote Git repository Cloning repository git://github.com/nuxeo/nuxeo.git > git init /opt/jenkins/workspace/_nuxeo-master-sonar_PR-2351-KWEA4QQ2JSNDIURDQ4ZFRKNYOG34BVR6XJTLGMCB5SQ5BVZ7LXHQ # timeout=10 Fetching upstream changes from git://github.com/nuxeo/nuxeo.git > git --version # timeout=10 > git fetch --tags --progress git://github.com/nuxeo/nuxeo.git +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url git://github.com/nuxeo/nuxeo.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url git://github.com/nuxeo/nuxeo.git # timeout=10 Fetching upstream changes from git://github.com/nuxeo/nuxeo.git > git fetch --tags --progress git://github.com/nuxeo/nuxeo.git +refs/heads/*:refs/remotes/origin/* > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision 46d37de3c8e6a6ef8c472ade46e42cc60fbe3206 (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f 46d37de3c8e6a6ef8c472ade46e42cc60fbe3206 > git branch -a -v --no-abbrev # timeout=10 > git checkout -b master 46d37de3c8e6a6ef8c472ade46e42cc60fbe3206 First time build. Skipping changelog. [Pipeline] sh [_nuxeo-master-sonar_PR-2351-KWEA4QQ2JSNDIURDQ4ZFRKNYOG34BVR6XJTLGMCB5SQ5BVZ7LXHQ] Running shell script + ./clone.py PR-2351 -f master [.] $> git fetch origin Branch PR-2351 not found, fallback on master $> git checkout master -q $> git rebase -q --autostash origin/master ++ git rev-parse HEAD ++ git rev-parse PR-2351 fatal: ambiguous argument 'PR-2351': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' + test 46d37de3c8e6a6ef8c472ade46e42cc60fbe3206 = PR-2351 [Pipeline] } [Pipeline] // stage [Pipeline] step [Pipeline] } [Pipeline] // timestamps [Pipeline] } [Pipeline] // timeout [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline GitHub has been notified of this commit’s build result java.lang.NullPointerException Finished: FAILURE