The following will get me the top most git commit hash:
def gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()

The following will get me the top most git commit message:
def gitCommitMessage = sh(returnStdout: true, script: 'git log -n 1 
--format=%s').trim()

However within one single build there is n number of commits. I need all 
commits listed on Changes.
Is there an environment parameter that would get me all the changes, or at 
least the number of changes to use in git log?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fd4e29cb-563f-4755-951d-8c48641a8cd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to