I have some specific scenario. I have raised one PR . There are multiple commits to this PR.
Now I need to get the commit hash, which is going to be generated after merging this PR to master. Is it possible to get the commit hash before merging it ?
suppose one application component is : xyz
we created a PR for that feature branch to master jenkins -> PR build starts -> deploy the application on a node -> jacoco plugin in the application creates a exec file
PR merge happend from master build -> no deployment for CC now ...
After the deployment is done, from a separate place CC coverage job is triggered -> which is going to take the exec file and push to sonar.
here I was trying to make it like .. the exec file name will have the <Future_git_commit_hash>_xyz.exec
in CC coverage job i will checkout this commit_id .. and then push to sonar. (here generally we dont need the commit_id, master only we can checkout and push to sonar) ...
problem comes if : before pushing to sonar, again one more PR is raised. and new exec file gets created. so i was thinking to have the commit id so that i can differentiate.
anyway if getting the commitid before merging is not possible.. need to check other approaches.