I'm tring to build Gerrit LFS plugin and i'm get the folloing error:
user@gerrit-server:~/review_site$ bazel test plugins/lfs
WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a WORKSPACE file).
ERROR: The 'test' command is only supported from within a workspace (below a directory having a WORKSPACE file).
When I touched WORKSPACE, I get:
ERROR: Skipping 'lfs': error loading package '': Label '//tools/bzl:js.bzl' is invalid because 'tools/bzl' is not a package; perhaps you meant to put the colon here: '//:tools/bzl/js.bzl'?
BTW, is there anyway to get Gerrit's plugin that allready build? (as .jar file)
There is a large list of plugin on the official website at https://www.gerritcodereview.com/plugins.html
The Plugin Matrix table is automatically maintained by their CI. At the top of the table there are link to the CI jobs building a given branch.
Thus if you run Gerrit 3.6.x you would use the stable-3.6
branch which leads to https://gerrit-ci.gerritforge.com/view/Plugins-stable-3.6/ , lookup for the LFS job and you will get a .jar there https://gerrit-ci.gerritforge.com/view/Plugins-stable-3.6/job/plugin-lfs-bazel-master-stable-3.6/
Gerrit comes with the plugin manager plugin built-in though it is not activated by default. See the documentation as to how you can enable it: https://gerrit.googlesource.com/plugins/plugin-manager/+/refs/heads/master/src/main/resources/Documentation/config.md . That should make it easy to install. (I don't know what are the security implication).