20 Commits

Author SHA1 Message Date
David Pursehouse
8b3324c69e Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Apply buildifier to .bzl files.
  Update Bower to 1.8.2
  Bump commons-io version to 2.2

Change-Id: Ic90865db76a0e34f0f8fef33b83ec7b2fd75c875
2018-07-11 08:35:07 +09:00
Han-Wen Nienhuys
b6a4048986 Apply buildifier to .bzl files.
Buildifier is now also used for formatting .bzl files.

This change was created by running buildifier 0.12 over our source tree.

Change-Id: I9f15112d4fe23e5cec0700cfe47f1ca649f61d2a
2018-07-10 20:38:52 +09:00
David Pursehouse
a5d14bdd0a Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Add integration test classes for "ssh index" commands
  Bazel: Harmonize names of external repositories

Change-Id: I081bb8c1fc148f7a86b82586a47ac445f521d8bb
2018-06-12 10:10:44 +09:00
David Ostrovsky
f98a60b35f Bazel: Harmonize names of external repositories
Recent Bazel versions support dash character in external repository
names. Consistently use them with one exception: javax_inject. This is
needed to match the name in the rules_closure.

Change-Id: I1e75690fe1ee2ab32fffe07c0c30dbed84753960
2018-06-08 19:33:01 +09:00
David Pursehouse
dcb0d67c93 Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Make zip generation (more) reproducible
  Make _bower_archive rule deterministic

Change-Id: Ic7f059bc53b1a5bb970b8e52708679f9c784c6bf
2018-04-25 08:58:24 +09:00
Han-Wen Nienhuys
ec12294301 Make zip generation (more) reproducible
The 'touch' command uses the system default timezone if none is
supplied. This makes zip files dependent on the timezone of the
generating machine.

Zip by default stores extended attributes (eg. ctime, atime) on Unix
systems. These can be further sources of non-determinism, so switch it
off with --no-extra

Change-Id: I7e102be7368ef339cbaf47524b90688c32a09238
2018-04-25 08:25:31 +09:00
Vladimir Moskva
2d2cf71d20 Rename set to depset in .bzl files
`set` is a deprecated alias of `depset` and will be removed from Bazel
starting from 0.6.

Change-Id: I0d9ca334d7fd32a36c1af4ca6baaed08d1600a9a
2017-10-02 12:31:54 +01:00
David Ostrovsky
e2eed17d37 Bazel: Replace ctx.action with actions#run / actions#run_shell
ctx.action() is deprecated in favor of ctx.actions.run() /
ctx.actions.run_shell(): [1]. See discussion in [2], why we need this.

[1] https://docs.bazel.build/versions/master/skylark/lib/ctx.html#action
[2] https://github.com/bazelbuild/bazel/issues/3589

Change-Id: I11af3afebc0d3c76bb8fb59a790db2e3f3ce982b
2017-08-30 08:49:11 +02:00
Vladimir Moskva
8fb9558ef6 Rename set to depset in .bzl files
`set` is a deprecated alias of `depset` and will be removed from Bazel
starting from 0.6.

Change-Id: I0d9ca334d7fd32a36c1af4ca6baaed08d1600a9a
2017-08-28 15:39:01 +02:00
David Ostrovsky
c5f8066629 Don't ship bouncycastle libraries in plugin API
We cannot shade bouncycastle in the plugin API. Still we need it to be
included in the gerrit.war, licenses file and Eclipse classpath.

Expose bouncycastle libraries in PLUGIN_TEST_DEPS constant, so that
the plugins don't need to change anything in tree build mode.

gerrit_api() bazlet in bazlets repository is extended too, so that the
plugins don't need to change anything in standalone build mode.

One side effect of this change, is that bouncycastle libraries are
now listed with neverlink suffix, e.g.:

* bouncycastle:bcprov-neverlink

Bug: Issue 5826
Change-Id: Idb8051e16b14e20c8dd528783ab297ee25707bb3
2017-04-07 07:38:04 +02:00
Han-Wen Nienhuys
8dfc795649 Make built-in bouncycastle actually work
This change fixes the following issues:

* server needs bcpkix for parsing public/private keys.

* do not special-case "jdk15on" in pkg_war.
  We only have these in the BC jars.

* remove BC specific license checking exceptions.

* remove language about requiring BC installed separately.

* remove BC special-casing from eclipse setup.

Tested:
  rm bin/* lib/* in testsite
  ran 141 -> 142 schema upgrade successfully
  ran daemon successfully
  LICENSE.txt in war file has an entry for the BC license
  Loaded new project in eclipse; verified that BouncyCastleUtil.java loads.

Change-Id: I80c2b0c038ada8397b44373194bd199f491a39c3
2017-02-20 15:02:06 +01:00
David Pursehouse
2d08500516 Format .bzl files with Bazel Buildifier
Change-Id: I3ab30565e5ac110a18cbe3d34f76307801c30373
2016-12-11 19:00:21 +09:00
David Ostrovsky
492ef018f6 Merge "Bazel: Include documentation in release and withdocs WAR" 2016-10-26 11:27:02 +00:00
David Ostrovsky
0491092832 Bazel: Fix build for headless WAR
Id45967aa8 broke headless rule:

no such target '//gerrit-gwtui:None': target 'None' not declared in
package 'gerrit-gwtui'

Change-Id: I726dee61c11caffa1889f948d3fb49a0123af9f6
2016-10-26 07:21:55 +02: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
b00302e0ce bazel: pass down **kwargs for some bzl macros.
Change-Id: If136681cc5605d4c945c06c5f01f410d9a98e016
2016-10-10 11:11:45 +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