4

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
Jirong Hu
  • 2,315
  • 8
  • 40
  • 63

2 Answers2

1

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

Tomas Bjerre
  • 3,270
  • 22
  • 27
  • Thanks, I am using "Git Changelog" plugin only on Windows Jenkins ver. 1.638. I've also read this issue: https://issues.jenkins-ci.org/browse/JENKINS-33301 – Jirong Hu Mar 15 '16 at 16:10
  • Figured out, I am using the step "Publish Git changelog", should use "Git changelog". – Jirong Hu Mar 15 '16 at 18:25
  • 1
    Hi! Is it possible to use this plugin in a Jenkins pipeline and if yes, how? – BadmintonCat Aug 25 '17 at 07:51
  • @BadmintonCat I was able to generate pipeline code for the Git Changelog Plugin using the snippet editor in Jenkins. You can get to the snippet editor by going to http:///pipeline-syntax/ From there, select "gitChangelog" from the Sample Step drop down. – B W May 23 '18 at 14:54
  • At first I thought you were wrong, but eventually I figured out you were right :) – Michael Davidson Apr 04 '19 at 20:46
  • @BadmintonCat here is the answer to that https://support.cloudbees.com/hc/en-us/articles/217630098-How-to-access-Changelogs-in-a-Pipeline-Job- – Peter Moore Dec 04 '19 at 05:15
1

Please select Git Changelog from Post-build Actions and configure like in your screenshot or follow the below screenshot of mine.

Git Changelog from Post-build Actions Dialog

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Shaik
  • 11
  • 2