gpt4 book ai didi

git - git 的 jenkins 中没有发生自动构建

转载 作者:行者123 更新时间:2023-12-04 18:07:59 24 4
gpt4 key购买 nike

在 jenkins 中,我勾选了“将更改推送到 git hub 时构建”,但当我将更改推送到 git repo url 时它仍然不会自动构建。

最佳答案

对于本地管理的 repos(即不在 github.com 上),Git plugin recommends :

To minimize the delay between a push and a build, it is recommended to set up the post-receive hook in the repository to poke Jenkins when a new commit is made.
To do this, add the following line in your hooks/post-receive where "URL of the Git repository" is the fully URL you use to clone this repository.

curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>[&branches=branch1[,branch2]*][&sha1=<commit ID>]

因此,您需要向目标存储库添加一个 Hook ,以便该 Hook 调用 Jenkins。

关于git - git 的 jenkins 中没有发生自动构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22062900/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com