- 文档首页
持续交付
用户指南
流水线
触发器
触发器常见问题
Gerrit 配置 Webhook 推送
触发器常见问题
Gerrit 配置 Webhook 推送
Gerrit 配置 Webhook 推送
对于 Gerrit 代码仓库,开启代码源触发后,您需前往对应代码仓库配置流水线的 Webhook 地址。
背景信息
Gerrit 代码仓库一般为私有化部署,仓库界面没有 Webhook 配置入口,用户需在本地编写完成 webhooks.config 文件,并将该配置文件推送至对应 project 下的 refs/meta/config 分支。
前提条件
已勾选目标流水线的事件触发设置,并且将对应的流水线 Webhook URL 复制出来。具体操作请参见 代码源触发。 操作步骤
git fetch origin refs/meta/config:refs/remotes/origin/meta/config
git checkout meta/config
[remote "changemerged"]
url = ${webhook\_url} # 填入准备好的流水线 Webhook URL
event = change-merged # 推送事件的名称
- 将该配置文件推送至目标 project 下的 refs/meta/config 分支。
git add . && git commit -m "add webhook config" && git push origin meta/config:meta/config
最近更新时间:2025.09.04 19:20:16