Near the top of my build console I see a \"Last Built Revision:\" w/ a revision #. How can I access this last built rev # in my build script? I\'m using Gradle, but I don\'t t
The Git plugin returns information from the checkout() command. In Pipeline script, this can be used to get the previous commit:
checkout()
def scmVars = checkout scm scmVars.GIT_PREVIOUS_COMMIT