如何让 BitBucket.org 提交触发 TeamCity 构建?

Cha*_*lie 5 teamcity bitbucket webhooks

如何在 BitBucket.org 中配置 webhooks 以触发 TeamCity 构建?

Cha*_*lie 6

使用 TeamCity REST API:

  1. 在 TeamCity 服务器上创建一个用户 Run build权限的用户
  2. 在 BitBucket 上创建一个新的 webhook 到准备好的 URL

    http://username:password@teamcity.server.address/httpAuth/app/rest/vcs-root-instances/commitHookNotification?locator=vcsRoot:(type:jetbrains.git,count:99999),property:(name:url,value:bitbucket.org/bitbucketusername/repo.git,matchType:contains),count:99999
    
    Run Code Online (Sandbox Code Playgroud)
    • 替换username,password为您刚刚创建的用户
    • 替换teamcity.server.address,bitbucketusername并repo使用您的回购值,

有关更多信息,请参阅文档: