We have project which have more than 500 unit test and run for hours through Jenkins CI pipeline. In case there is failure of single UNIT test we need to kick off the build job again. I want to run the Unit Test job in Jenkins before merging the changes to master branch as staged so that build will not break in master and thoroughly tested within feature branch itself.
Note - I have read about the Pre-receive hook which can be implmented in Master branch but i am not able to figure out Gated check-in process and where the changes and existing code of master branch will run.