blob: 79cf6cb6e72699cf35cc16e79f667398c55e67ed [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(
Serge Bazanski97b5cd72023-07-28 17:14:50 +00004 name = "with_plugins",
5 base = "@gerrit-3.3.2//image",
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +02006 # we cannot drop it directly in /var/gerrit/plugins as that changes the
7 # directory owner to 0:0 and then breaks the gerrit installer that wants
8 # to overwrite plugins.
9 directory = "/var/gerrit-plugins",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000010 files = [
11 "//devtools/gerrit/gerrit-oauth-provider",
12 "@com_googlesource_gerrit_plugin_owners//owners:owners.jar",
13 ],
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +020014)
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",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000019 directory = "/var/gerrit-theme",
Serge Bazanski408d5442021-03-17 22:14:53 +010020 files = [
21 "theme/etc/GerritSite.css",
22 "theme/static/pepper-icon.png",
23 ],
Serge Bazanski408d5442021-03-17 22:14:53 +010024)
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",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000031 base = "with_theme",
32 directory = "/var/gerrit/bin/",
Serge Bazanski146c99e2021-03-18 19:15:38 +000033 files = [
34 "@org_q3k_gerrit_3_3_2_backport//file:gerrit.war",
35 ],
Serge Bazanski146c99e2021-03-18 19:15:38 +000036)
37
38container_image(
Serge Bazanski97b5cd72023-07-28 17:14:50 +000039 name = "3.3.2-r4",
40 base = ":with_gerrit_override",
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +020041 directory = "/",
42 entrypoint = ["/entrypoint.sh"],
Serge Bazanski97b5cd72023-07-28 17:14:50 +000043 files = [":entrypoint.sh"],
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +020044)
45
Sergiusz Bazanski222a00a2020-04-12 18:37:21 +020046container_push(
47 name = "push",
Sergiusz Bazanski222a00a2020-04-12 18:37:21 +020048 format = "Docker",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000049 image = ":3.3.2-r4",
Sergiusz Bazanski222a00a2020-04-12 18:37:21 +020050 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)