[JENKINS-14862] add option to get the whole repository on clone/pull

if you want to build a tag it is necessary to pull the whole repository
fixes [JENKINS-14862]