How to get the list of changes since the last successful build via script
I'm fairly new to Jenkins, although my workplace has been using it for some time for automated builds. We are using Jenkins version 2.60.1
I've been asked to help our build team by writing a script to execute during/after a build which will get all the changes since the last successful build and parse it, pulling out JIRA/Rally ticket numbers and doing something interesting with them.
I'm not sure where to start. I can see that when I look at a completed build, there is a menu item on the left called Changes and when I click on that, I see the list of Git commits which went into this build.
Where can I create a script which will get this list and give me some ability to parse it and do something with it (I'm not sure what they want to do yet - perhaps send an e-mail or create an information page which would be shown in Jenkins, if that's even possible)?
Do I add something to the build's configuration? In there I see General, Source Code Management, Build Triggers, Build Environment, Build and Post-build Actions.
Please let me know if you would like more information about what we're trying to do.