简体   繁体   English

Azure DevOps 和私有 git 存储库

[英]Azure DevOps and private git repository

I'm using Azure DevOps, however source code is located on my private git server.我正在使用 Azure DevOps,但是源代码位于我的私人 git 服务器上。 I don't want to use polling, instead I want to trigger a build everytime I push something to git.我不想使用轮询,而是想在每次向 git 推送内容时触发构建。 Is it possible to do?有可能吗? How?如何?

Your setup would need to look like this:您的设置需要如下所示:

  1. Create an Azure DevOps Build pipeline with your private Git server as source使用私有 Git 服务器作为源创建 Azure DevOps Build 管道
    在此处输入图片说明
  2. Configure a Git hook (eg post-recieve hook), which calls the Azure DevOps REST-API to queue a new build配置一个 Git 钩子(例如post-recieve钩子),它调用Azure DevOps REST-API来排队一个新的构建

Okay, it appears its not possible with service hooks (i thought service hooks would allow you to do that, but they are only for events originating from Azure Devops).好的,服务挂钩似乎不可能(我认为服务挂钩可以让您这样做,但它们仅适用于源自 Azure Devops 的事件)。 Judging by the lack of documentation on this part - I dont think its supported, but looking at this thread it might be possible to do so without service hooks.从这部分文档的缺乏来看 - 我认为它不受支持,但是查看线程可能可以在没有服务挂钩的情况下执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM