如何在 Jenkins 中设置“Git Changelog”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36016043/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to set up "Git Changelog" in Jenkins?
提问by Jirong Hu
https://wiki.jenkins-ci.org/display/JENKINS/Git+Changelog+Plugin
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?
首先,我只看到屏幕截图中的内容,找不到“在作业摘要页面上打印”和“创建文件”部分。然后我得到如下所示的错误。谁能告诉我如何在这个插件中正确设置参数?
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
回答by Tomas Bjerre
When you add a "Post Build Step" you can choose "Git Changelog" and/or "Git Publisher". You should pick "Git Changelog".
添加“构建后步骤”时,您可以选择“Git Changelog”和/或“Git Publisher”。你应该选择“Git Changelog”。