您的Jenkins URL可从您的位桶服务器访问吗?如果是,那应该很简单。您可以将Webhook添加到存储库中
http://<url-of-jenkins>/git/notifyCommit?url=<url-of-repository>。当jenkins收到此POST时,它将自动触发那些使用此git repo和您在webhook中提供的URL的作业的构建。
但是,您还需要确保将
Build Schedule这些作业设置为空。否则它不会被触发。您也可以在webhook URL中指定分支。
请参见
Push Notification from repository此处
https://wiki.jenkins.io/display/JENKINS/Git+Plugin
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)