Jenkins Changelog for Git标签

时间:2015-12-15 20:15:32

标签: git jenkins

我正在尝试设置Jenkins以根据给定标记以来Git存储库中的更改生成其更改日志。

有谁知道这样做的方法?

我尝试使用“使用以下几个不同选项计算针对特定分支的更改日志”高级行为:

  • 存储库名称:Origin
  • 分支名称:refs / tags / mytag

但我得到的错误如下:

Using 'Changelog to branch' strategy.
fatal: bad revision '^origin/refs/tags/mytag'
ERROR: Unable to retrieve changeset
hudson.plugins.git.GitException: Error launching git whatchanged
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:786)
    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
    at hudson.remoting.UserRequest.perform(UserRequest.java:121)
    at hudson.remoting.UserRequest.perform(UserRequest.java:49)
    at hudson.remoting.Request$2.run(Request.java:325)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at hudson.remoting.Engine$1$1.run(Engine.java:69)
    at java.lang.Thread.run(Unknown Source)
    at ......remote call to tur-ciwinbuild1(Native Method)
    at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1361)
    at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
    at hudson.remoting.Channel.call(Channel.java:753)
    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
    at sun.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
    at com.sun.proxy.$Proxy96.execute(Unknown Source)
    at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1148)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1069)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
    at hudson.model.Run.execute(Run.java:1744)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:374)

1 个答案:

答案 0 :(得分:3)

找到答案 - 使用:

  • 存储库名称:refs
  • 分支名称:tags / mytag