system-config/docker/gerrit/bazel/build-gerrit.sh
Clark Boylan 3279a7ec10 Gerrit image cleanups/fixes
We name the base image we build gerrit-base and we expose port 8081
not 8080 as opendev's gerrit listens on 8081.

Also explicitly build the javamelody plugin deps jar and copy it into
the review_site/lib dir on Gerrit 2 bazel builds. This is necessary
according to javamelody plugin build docs. In order to split Gerrit 2.x
and 3.x behavior in the Bazel builds we convert our Dockerfile into a
multi stage build.

All this ended up down a thread pull where the script in the Dockerfile
dir called build-gerrit.sh isn't actually used to build gerrit :/
clarify that. The script may be useful for local builds so we haven't
removed it yet.

Finally update gerrit plugin checkouts to tags or master as appropriate
where stable branches don't exist for the specified version.

Change-Id: I155a20685b3462e965c4216d134b3b36978fbcc7
2020-08-11 13:15:06 -07:00

19 lines
646 B
Bash
Executable File

#!/bin/bash
# Note this script doesn't seem to be used by the image builds.
# The system-config/roles/bazelisk-build role seems to be used instead.
set +x
for attempt in seq 1 3 ; do
bazel build plugins/javamelody:javamelody-deps_deploy.jar release \
--define=ABSOLUTE_JAVABASE=/usr/lib/jvm/java-8-openjdk-amd64 \
--javabase=@bazel_tools//tools/jdk:absolute_javabase \
--host_javabase=@bazel_tools//tools/jdk:absolute_javabase \
--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \
--java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \
$@
result=$?
done
exit $result