15 Commits

Author SHA1 Message Date
David Ostrovsky
26f8da8f4d Bazel: Add :api rule to build all API artifacts at once
This simplifies house keeping for the CI implementations and this was
always supported in Buck driven build. Wenn new API is added, only one
rule needs to be updated, and all CI implementation would reflect
building of new API without any changes on their side.

Change-Id: I050cef1e1545431d8806bd3a15a267842e3ed809
2016-12-24 09:33:27 +01:00
David Ostrovsky
fa18907d7f Bazel: Reformat build files
Reformat the Bazel build files with the buildifier tool [1].

The style is different for Bazel files. Most notably, indentation level
is 4 spaces instead of 2, and " is used instead of '.

[1] https://github.com/bazelbuild/buildifier

Change-Id: I95c0c6f11b6d76572797853b4ebb5cee5ebd3c98
2016-12-07 11:33:07 +00:00
David Ostrovsky
01090f2f0d Bazel: Fix visibility for //: rules
Change-Id: If5d59f3afde2f9a4bdf4e7dab9eef6b3c5c93693
2016-11-05 00:50:30 +01:00
David Ostrovsky
9413ff85f4 Bazel: Include documentation in release and withdocs WAR
Change-Id: Ide3114d14cc8acc722f6e04cf2fc357d16775df9
2016-10-25 22:34:10 +02:00
Han-Wen Nienhuys
da5999b039 bazel: build a polygerrit war too.
Change-Id: Id45967aa844faedee3ab501491cd30cdb903a789
2016-10-25 13:12:26 +00:00
Han-Wen Nienhuys
dc255120cf Reinstate 214171ddda6c173e528affee625aa65db8dcc360
bazel: generate the workspace version from the volatile status.

To work across bazel 0.3.1 and 0.3.2, we should grep both volatile and
stable status files for the magic version string.

Change-Id: I48361374a8d9cda1e7a5b5db4e147bc49b4452a3
2016-10-24 14:47:44 +02:00
David Ostrovsky
47deed6a86 Revert "bazel: generate the workspace version from the volatile status."
Bazel 0.3.2 introduced regression: [1] workspace_status_command seems to
be ignored. That broke Bazel build. Revert this change and re-consider to
re-apply it, when the problem is fixed upstream.

* [1] https://github.com/bazelbuild/bazel/issues/1976

This reverts commit 214171ddda6c173e528affee625aa65db8dcc360.

Change-Id: I729ffaf6ae1bff5fb858d78de2a6915058c9e651
2016-10-24 11:39:36 +09:00
Yuxuan 'fishy' Wang
14fdf9342e bazel: genasciidoc and genasciidoc_zip rule
Implement genasciidoc rule for bazel. It's a filegroup containing all
the html and resource files.

Also implement genasciidoc_zip rule for bazel, which is similar to
buck's genasciidoc rule to produce a zip file containing all asciidoctor
generated and resource files.

TEST PLAN:
  bazel build Documentation
  buck build Documentation:html
  diff -u bazel-bin/Documentation/install.html buck-out/gen/Documentation/html__tmp/Documentation/install.html

Change-Id: I3065355800a982c6956d3bb634204baaa60c045e
2016-10-07 15:20:35 +08:00
David Ostrovsky
af71968891 Bazel: Fix build for core plugins
I382757618 added the Bazel build for core pluins, but missed to add
plugins/BUILD file.

TEST PLAN:

  bazel build release
  unzip -t bazel-bin/release.war | grep --regex "plugins/.*.jar" | wc -l
  6

Change-Id: I3338541ec61905db6658761fa5c6fc374dba0348
2016-09-29 21:12:53 +02:00
Han-Wen Nienhuys
5e4491886b bazel: update for elasticsearch and lucene.
Change-Id: Icb9f9f0344b10a008d5b353362933890446eb544
2016-09-28 21:17:08 +02:00
Han-Wen Nienhuys
214171ddda bazel: generate the workspace version from the volatile status.
This generates a version file that looks correct, but doesn't rebuild
correctly.  Correct rebuilds will be provided by a version of
bazel containing

  a2897bff4c

Change-Id: I5101d7f2643d464cf32c8281a28ec6c3fc4fa2cf
2016-09-27 15:01:24 +02:00
David Ostrovsky
f5fe0f84b6 Bazel: Build release war
Change-Id: I382757618721ef43bd6fa9ada7d120df27dcc082
2016-09-23 14:20:15 +02:00
David Ostrovsky
d4ca9529f9 Bazel: Build gerrit WAR with GWT UI
TEST PLAN:

  bazel build :gerrit
  java -jar bazel-bin/gerrit.war init -d ../test_site_bazel

Verify that complete Gerrit installation including GWT UI is up and
running.

Change-Id: I2e9097b1bc59f0a22269449c15583f12d75acf65
2016-09-20 13:53:34 +02:00
David Ostrovsky
f6b7d4a18d Bazel: Produce headless war
This change creates the archive with:

lib
pgm-lib
default web assets

but without:

GWT UI
PolyGerrit UI
Plugins
Documentation

TEST PLAN:

  bazel build :headless
  java -jar bazel-bin/headless.war init -d ../test_site_bazel

Change-Id: I53987b10a5863aee0298bd2ea29405c26dbacb0c
2016-09-20 09:16:56 +02:00
David Ostrovsky
e0f23b9f0d Implement Bazel build for gerrit-war project
Change-Id: I962fccfea823f42be186d518591145c6278021ba
2016-09-19 16:57:32 +02:00