首页 文章

Jenkins:tfs repo没有触发Jenkins构建,但为什么呢?

提问于
浏览
0

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

Things I've done to configure the solution:

  • 我在TFS存储库上为Jenkins创建了一个服务挂钩 .

  • 我在Jenkins上安装了Team Foundation Server插件和VS Team Services持续部署,并按如下方式配置了这些作业:

在“源代码管理”下,我选择了Team Foundation Version Control(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

然后点击保存 .

These are the tests I've done:

我手动运行构建:

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

这是我通过Jenkins运行工作时遇到的错误 .

  • 我已经推动对回购的改变,期望它触发詹金斯的构建,但什么都没发生 .

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

知道我做错了什么吗?

1 回答

  • 1

    当您使用Git版本控制系统时,“Team Foundation版本控制(TFVC)”选项用于从TFVC版本控制系统获取文件 . 请在“源代码管理”下选择“Git”选项,然后重试 .

相关问题