In Jenkins, I want to create a job that compares the last stable build from a Git project with the Git release branch I am going to deploy. How do I call the branch name from the other project and compare it with the release branch and fail the job if git does not come back with 'nothing to do'. The new release branch should be diffed into the previous release branch and both should have the same ancestry etc. The Jenkins API only gives back the build number, but i want the branch name.
should be something like: git fetch git diff