blob: 9f089fdf33918f424328241bee772aa9c067a26f [file] [log] [blame]
Sergiusz Bazanski222a00a2020-04-12 18:37:21 +02001load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +02002
3container_image(
4 name="with_plugins",
Serge Bazanskidd692212021-03-11 17:51:02 +01005 base="@gerrit-3.3.2//image",
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +02006 files = [
Sergiusz Bazanski57efce62019-07-21 16:39:54 +02007 "//devtools/gerrit/gerrit-oauth-provider:gerrit-oauth-provider",
Sergiusz Bazanski222a00a2020-04-12 18:37:21 +02008 "@com_googlesource_gerrit_plugin_owners//owners:owners.jar",
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +02009 ],
10 # we cannot drop it directly in /var/gerrit/plugins as that changes the
11 # directory owner to 0:0 and then breaks the gerrit installer that wants
12 # to overwrite plugins.
13 directory = "/var/gerrit-plugins",
14)
Serge Bazanski408d5442021-03-17 22:14:53 +010015
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +020016container_image(
Serge Bazanski408d5442021-03-17 22:14:53 +010017 name = "with_theme",
18 base = ":with_plugins",
19 files = [
20 "theme/etc/GerritSite.css",
21 "theme/static/pepper-icon.png",
22 ],
23 directory = "/var/gerrit-theme",
24)
25
Serge Bazanski146c99e2021-03-18 19:15:38 +000026# Add gerrit 3.3.2 with backported fix. See org_q3k_gerrit_3_3_2_backport in
27# WORKSPACE for more background.
28# TODO(q3k): drop once gerrit > 3.3.2 lands.
Serge Bazanski408d5442021-03-17 22:14:53 +010029container_image(
Serge Bazanski146c99e2021-03-18 19:15:38 +000030 name = "with_gerrit_override",
31 base="with_theme",
32 files = [
33 "@org_q3k_gerrit_3_3_2_backport//file:gerrit.war",
34 ],
35 directory = "/var/gerrit/bin/",
36)
37
38container_image(
39 name="3.3.2-r4",
40 base=":with_gerrit_override",
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +020041 files = [":entrypoint.sh"],
42 directory = "/",
43 entrypoint = ["/entrypoint.sh"],
44)
45
Sergiusz Bazanski222a00a2020-04-12 18:37:21 +020046container_push(
47 name = "push",
Serge Bazanski146c99e2021-03-18 19:15:38 +000048 image = ":3.3.2-r4",
Sergiusz Bazanski222a00a2020-04-12 18:37:21 +020049 format = "Docker",
50 registry = "registry.k0.hswaw.net",
Serge Bazanskiee2f8a32020-12-17 23:06:10 +010051 repository = "q3k/gerrit",
Serge Bazanski146c99e2021-03-18 19:15:38 +000052 tag = "3.3.2-r4",
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +020053)