How to install delete-project plugin in gerrit?

若如初见. 提交于 2019-11-30 09:05:05

I managed to install delete-project plugin after following this thread:

https://groups.google.com/forum/#!topic/repo-discuss/hbBc2TUhl7s

and then install according to:

https://gerrit-review.googlesource.com/Documentation/cmd-plugin-install.html

P.S. I build the jar following the below steps:

  1. git clone --recursive https://gerrit.googlesource.com/gerrit
  2. cd gerrit
  3. git clone --recursive https://gerrit.googlesource.com/plugins/delete-project
  4. buck build delete-project:delete-project

You should then find the delete-project.jar in buck-out/gen/delete-project/delete-project.jar

  1. Download the delete-project.jar from the build that matches your Gerrit version on https://gerrit-ci.gerritforge.com
  2. Copy it to gerrit/plugins directory.
  3. Restart Gerrit.

I managed to successfully build delete-project plugin with a slight modification on @DavidCheung answer:

  1. git clone https://gerrit.googlesource.com/gerrit
  2. cd gerrit/plugins
  3. git clone https://gerrit.googlesource.com/plugins/delete-project
  4. buck build delete-project:delete-project

You should then find the delete-project.jar in ../buck-out/gen/delete-project/delete-project.jar

I struggled with the answers above, maybe due to having a new version of Gerrit (2.11.2). The steps in this document all worked for me, with one addition - you need to add the --recursive flag when you clone the Gerrit source code so that it includes the source for the standard plugins:

git clone --recursive https://gerrit.googlesource.com/gerrit

Also, make sure to check out the correct Git branch for your Gerrit version,e.g.

git fetch origin stable-2.11:stable-2.11
git checkout stable-2.11
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!