I want to set up a web-hook using custom commit message. I want to trigger web hook when developer commit files with 'Proceed with Migration' Commit message.
How can I do this?
The following code worked for me, simply check the latest git commit message and selectively build your job:
def resultlog = sh(returnStdout: true, script: 'git log -1 --pretty=%B')
if (resultlog.contains("Proceed with Migration")) {
//your code
}
This helped me.