gerrit

How can one take several top-level projects in Gerrit and move them under another “container” project?

好久不见. 提交于 2019-12-04 15:52:25
I have a Gerrit installation within which are several related projects (each in a git repository). Another project is coming online would also use gerrit, but for the sake of tidiness I'd like to take the existing set of projects and put them under a new super-project (so that at the top level one sees the "umbrella" projects. I'd also like to retain the data we have for this (e.g., the review history). How does one go about doing something like this? Another way of looking at this is, how does one move a sub-project in gerrit from one super-project to another? Thanks to this blog post I

Importing already existing git repo with multiple branches and tags into gerrit

夙愿已清 提交于 2019-12-04 14:33:25
I'm trying to import an already existing git repository with multiple branches and tags into gerrit. I'm following the official guide at https://gerrit-review.googlesource.com/Documentation/install-quick.html#_already_existing_project . However, when issuing the push command all the branches and tags, except "master" which I'm currently in, are "prohibited by Gerrit". The output is something like this: user@host:~/my-project$ git push ssh://user@localhost:29418/demo-project *:* [....] * [new branch] master -> master ! [remote rejected] origin/Branch1 -> origin/Branch1 (prohibited by Gerrit) !

Gerrit change-merged Hook

北城余情 提交于 2019-12-04 12:38:12
I use git as my version control system and have set up a Gerrit site to do the code review. I would like to create a hook to do the following: When the admin clicks the Submit button, a file (called version.txt ) should be modified. Script should open the file. Find the following text (where the ID may change) #version Change-Id: Ie1411d50f6beb885bc3d3b7d8c587635e1446c18 Replace the Change-Id with the Change-Id of the new patch. So, if the patch being merged has the Change-Id: I1c25f7b967084008b69a6a8aefa6e3bb32967b82 then the version.txt file should contain the following string after the

Push current branch to Gerrit

空扰寡人 提交于 2019-12-04 10:57:38
问题 I like to use simply git push to push (only) the current branch to the configured upstream. For that I set git config push.default upstream which does exactly the right thing. Now I tried to set up a a suitable remote for Gerrit, which automatically pushes to refs/for/* . The idea was doing it this way: [remote "gerrit"] url = ssh://host:port/repo push = refs/heads/*:refs/for/* I would like to type git push gerrit and expect git to push only the current branch to the correct ref.

docker中git和gerrit的使用小结

主宰稳场 提交于 2019-12-04 09:23:24
最近在学习docker ,将做好的镜像传到hub上的仓库中。其中用到了git和gerrit。git是常用的分布式版本控制系统,gerrit是一种便捷的代码审查软件。下面对linux上git和gerrit的使用做一下小总结。 1.安装 $ sudo apt-get install git $sudo pip install git-review $git review –s 首次使用gerrit时需写入这一句,做两件事: (1). install commit-msg into .git/hooks,whichautomatically generate change ids. (2). read the .gitreview configure file,add a git remote url named gerrit. 2. 配置 git $git config --global user.name "Firstname Lastname" $git config --global user.email "your_email@youremail.com" 3.创建版本库 repository $ mkdir learngit $cd learngit/ $pwd 查看当前目录 /home/cloud/ learngit $git init 之后版本库就创建好了

docker笔记4--配置gerrit

可紊 提交于 2019-12-04 09:17:45
docker笔记4--配置gerrit gerrit,一种免费、开放源代码的代码审查软件,使用网页界面。利用网页浏览器,同一个团队的软件程序员,可以相互审阅彼此修改后的程序代码,决定是否能够提交,退回或者继续修改。它使用Git作为底层版本控制系统。它分支自Rietveld,作者为Google公司的Shawn Pearce,原先是为了管理Android计划而产生。gerrit同gitlab、github一样可以用于团队管理项目代码和文档,相对于gitlab更加轻量,其运行时所消耗资源较少。 1、安装方法 1)下载gerrit docker镜像 docker pull openfrontier/gerrit 2)新建本地目录用于存放gerrit产生的数据,如gerrit_volume mkdir gerrit_volume 3)配置docker http启动命令 启动目录下(建议将该配置写到shell脚本中): docker run \ --name mygerrit \ -v $PWD/gerrit_volume:/var/gerrit/review_site \ -p 8091:8091 -p 29418:29418 \ -e USER_NAME=yourName \ -e USER_EMAIL=yourEmail@163.com \ -e AUTH_TYPE=HTTP \ -e

Gerrit and Active Directory

早过忘川 提交于 2019-12-04 08:51:39
问题 I'm trying to set up Gerrit to use our corporate Active Directory for authentication. I know plenty of people have managed to get this to work but it just won't work for me. If I run an ldapsearch command as follows I get the correct result, so I know my search strings are correct: ldapsearch -h myserver -b "CN=Users,DC=mycompany,DC=com" -D "CN=adam,CN=Users,DC=mycompany,DC=com" -w mypassword "(sAMAccountName=adam)" But using these same settings in my Gerrit config doesn't work: [auth] type =

How to disable direct push to Gerrit?

∥☆過路亽.° 提交于 2019-12-04 07:58:32
While working with Gerrit, the expected push is: git push origin HEAD:refs/for/branch But some bad guys seems to do this in a simple way(they learned from some Git manual): git push origin or git push These operation will cause serious problems: The commit merged directly into master (or some default) branch in remote server. Although the guys write some commit message, but git log can'not find them. Maybe more... Is there was a way to disable these push operation in Gerrit settings? Or disable it in client? rcomblen There are permissions in the Gerrit admin UI. Permissions are inherited from

Jenkins configuration

痴心易碎 提交于 2019-12-04 07:01:09
I have a GIT repository. When I pushed a GIT change into Gerrit, it triggers a jenkins build and if successful, it merges the code to the GIT repository. But, Jenkins is building the source from GIT repo always. It is not picking the change pushed into Gerrit. What settings should I change in Gerrit/Jenkins ? In the jenkins configuration for the git Source Code Management section, click the advanced button and set your refspec to $GERRIT_REFSPEC which will pick up the change set that was commit. 来源: https://stackoverflow.com/questions/9359891/jenkins-configuration

How to post votes on custom labels from jenkins gerrit trigger?

南笙酒味 提交于 2019-12-04 05:02:18
I'm using jenkins gerrit-trigger plugin. It does trigger the job. The problem is that after job is finished jenkins cannot send review becasue I have no 'verified' label in gerrit. I found that in configuration there is Gerrit Reporting Values section (Jenkins -> Manager -> Gerrit Trigger -> Click on your gerrit "edit" button). In that section there are hardcoded subsections for "Verify" and "Code Review". Another subsection is "Gerrit Verified Commands" with commands like: gerrit review <CHANGE>,<PATCHSET> --message 'Build Successful <BUILDS_STATS>' --verified <VERIFIED> --code-review <CODE