Gerrit - Gitlab 集成 [英] Gerrit - Gitlab Integration

查看:25
本文介绍了Gerrit - Gitlab 集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了改进开发过程,我们组织决定在开发工作流程中引入 Gerrit.我是负责实施 Gerrit 服务器的人.互联网上提供的用户指南非常有助于将 Gerrit 应用到我们现有的工作流程中.我们使用 Jenkins 和 Sonar 作为非交互式用户来验证构建.但是在处理存储库时,会出现一个问题.大多数开源都使用 gerrit-replication 插件将最新代码复制到他们的公共代码存储库.这些公共存储库使用 GitLab 公开,以便用户可以克隆代码.在这里,我们不需要公共存储库,因为代码是在内部维护的.

In order to improve the development process, our organization have decided to introduce Gerrit in the development workflow. I am the person responsible for implementing Gerrit server. The user guides available in internet were very helpful in implementing Gerrit to our existing workflow. We are using Jenkins and Sonar as Non-interactive users for verifying the builds. But while dealing with repositories one question rises. Most of the open sources are using gerrit-replication plugin to replicate the latest code to their public code repository. These public repositories are exposed using GitLab so that the users can clone the code. Here we doesn't need a public repository as the code is maintained in house.

将 GitLab 和 Gerrit 都指向一个公共的 git 存储库位置是一个不错的选择吗?

Is it a good choice to point both GitLab and Gerrit to a common git repository location?

任何帮助表示赞赏.

推荐答案

你可以通过复制功能在gitlab前面使用gerrit.复制功能不执行 git clone/fetch,它仅将更改推送(批准)到远程存储库.

You can use gerrit in front of gitlab via the replication feature. The replication feature does not do a git clone/fetch, it only pushs (approved) changes to a remote repository.

  • 您必须通过例如导入存储库'git push origin master' 需要额外权限(或者您需要成为管理员).这没什么大不了的,除非你忘记删除这些权限.如果您忘记删除这些权限或管理员(拥有这些权限):默认的git push"将不经过审核就通过.
  • 你必须确保没有人可以提交到 gitlab 实例.否则你很有可能遇到合并冲突(gerrit 是不知道这些新提交).你可以保护树枝gitlab——但是管理员(如果我没记错的话存储库创建者/所有者)也将始终拥有此权利.
  • 您必须授予 gerrit 用户 master 权限才能将其推送到 gitlab 存储库.
  • 所有项目都必须先在 gitlab 中创建,否则它们将不会同步(除非您找到一种方法,在第一次 git push 时会在 gitlab 中自动创建 repo)

这篇关于Gerrit - Gitlab 集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆