How do I get the git information right which were - in the past - provided by Jenkins Git plugin?
I have found one information here: https://github.com/jenkinsci/pipeline-examples/blob/master/pipeline-examples/gitcommit/gitcommit.groovy You see that in the code below (extract). I have the treeish (job parameter which refers to a git tag name or git branch name). What I'm still missing ... let's say since last build there might have been (n=5) commits. So I would like to have the "n" commit messages. I know how to get the last "n" log messages in Git ... ...but how do I know how many commits have been since last build? *I see from the stage view (left side, row labels) that the pipeline definitely knows aboutthe number of commits and even it knows the git details showing them in a tooltip whenI move with the mouse cursor above the label.* *How can I get this information after the checkout?* Kind Regards, Thomas APPENDIX: // ... // Retrieving first 6 characters of the SHA Git commit id. def getCommit() { def command="git rev-parse HEAD > " + this.workspace + "/GIT_COMMIT" script.sh(command) script.readFile(this.workspace + "/GIT_COMMIT").take(6) } // ... stage 'Get Code' checkout([$class: 'GitSCM', branches: [[name: treeish]], doGenerateSubmoduleConfigurations: false, submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'XXXXXXXXXXX_CREDENTIALS', url: 'ssh://git@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxt']]]) -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/eeba94cb-242f-4c53-b5bb-acee892202e6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.