How to set up "Git Changelog" in Jenkins?

Jirong Hu picture Jirong Hu · Mar 15, 2016 · Viewed 13.5k times · Source

https://wiki.jenkins-ci.org/display/JENKINS/Git+Changelog+Plugin

First, I only see what's in my screenshot, can't find the "Print on job summary page" and "Create file" sections. Then I got the error shown below. Can anyone show me how to properly set parameters in this plugin?

enter image description here

Checking out Revision a781fbc49bda7083ebc05e28cee60de4e4258b17 (refs/remotes/origin/master)
 > D:\Git\bin\git.exe config core.sparsecheckout # timeout=10
 > D:\Git\bin\git.exe checkout -f a781fbc49bda7083ebc05e28cee60de4e4258b17
 > D:\Git\bin\git.exe rev-list a781fbc49bda7083ebc05e28cee60de4e4258b17 # timeout=10
[GitChangelog] $ cmd /c call C:\Users\SVC_SE~2\AppData\Local\Temp\hudson6987037442402124620.bat

D:\public_jendevslave_1\workspace\Playground\GitChangelog>set
...
GIT_BRANCH=origin/master
GIT_COMMIT=a781fbc49bda7083ebc05e28cee60de4e4258b17
GIT_PREVIOUS_COMMIT=a781fbc49bda7083ebc05e28cee60de4e4258b17
WORKSPACE=D:\public_jendevslave_1\workspace\Playground\GitChangelog

D:\public_jendevslave_1\workspace\Playground\GitChangelog>exit 0 
Saving processed git changelog to file D:\Jenkins\git_changelog.txt.
ERROR: Build step failed with exception
java.lang.RuntimeException: Ref a781fbc49bda7083ebc05e28cee60de4e4258b17 not found.
    at de.wellnerbou.gitchangelog.jgit.GitLogBetween.getJGitLogBetween(GitLogBetween.java:34)

Build step 'Publish Git changelog' marked build as failure

Answer

Tomas Bjerre picture Tomas Bjerre · Mar 15, 2016

When you add a "Post Build Step" you can choose "Git Changelog" and/or "Git Publisher". You should pick "Git Changelog".