Jenkins 詹金斯:tfs回购不会触发詹金斯构建,但为什么?

Jenkins 詹金斯:tfs回购不会触发詹金斯构建,但为什么?,jenkins,tfs,Jenkins,Tfs,我已经配置了一个Jenkins作业,该作业监视TFS git存储库,并且应该在代码更改(推送)时触发构建 我为配置解决方案所做的工作: 我已经在TFS存储库上为Jenkins创建了一个服务钩子 > p>我已经安装了Team Foundation Server插件和VS团队服务连续部署在詹金斯上,并配置了这样的作业: 在“源代码管理”下 我选择了Team Foundation版本控制(TFVC),并将其配置为如下: Collection URL: https://company.visual

我已经配置了一个Jenkins作业,该作业监视TFS git存储库,并且应该在代码更改(推送)时触发构建

我为配置解决方案所做的工作:

  • 我已经在TFS存储库上为Jenkins创建了一个服务钩子

  • > p>我已经安装了Team Foundation Server插件和VS团队服务连续部署在詹金斯上,并配置了这样的作业:

在“源代码管理”下 我选择了Team Foundation版本控制(TFVC),并将其配置为如下:

Collection URL: https://company.visualstudio.com/defaultcollection
Project path: $/Wilhelm/_git/NWilhelm
Credentials: Automatic (I've also tried with Manual creds and got the same result)
然后,在“管理Jenkins->配置系统”中,在TFS/Team Services下,我配置了:

Collection URL: https://company.visualstudio.com    
Credentials: Selected the correct user which has access to the repo
Enable Push Trigger for all jobs: checked
然后单击保存

这些是我做的测试:

我手动运行了构建:

Started by user Itai
Building remotely on jenkins-windows-slave (windows-slave) in workspace c:\jenkins\workspace\iis-deploy-new
Querying for remote changeset at '$/Wilhelm/_git/NWilhelm' as of 'D2017-03-19T15:39:58Z'...
Query returned no result!
FATAL: null
java.lang.NullPointerException
    at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:276)
    at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:271)
    at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:287)
    at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:359)
    at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:308)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1728)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE
这就是我通过詹金斯执行任务时遇到的错误

  • 我推动了回购协议的变更,希望它能在詹金斯的基础上引发一场构建,但什么也没发生

  • 我已经检查了作业中的TFS webhook日志,但它是空的


在使用Git版本控制系统的时候,用TFVC版本控制系统来获取文件,“T/P>< P>”Team Foundation版本控制(TFVC)选项。请在“源代码管理”下选择“Git”选项,然后重试。

您是否阅读了本教程:并检查了TFS上的配置,是否使用VST或内部部署TFS?如果使用内部部署TFS,详细的TFS版本是什么?