blob: 255adb7777f6c264fdaa21de1c65b4c27b2fa13b [file] [log] [blame]
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +02001load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push")
Sergiusz Bazanski4c0e9b52020-04-08 22:42:33 +02002load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
3
4go_library(
Serge Bazanski97b5cd72023-07-28 17:14:50 +00005 name = "depotview_lib",
Sergiusz Bazanski4c0e9b52020-04-08 22:42:33 +02006 srcs = ["main.go"],
7 importpath = "code.hackerspace.pl/hscloud/devtools/depotview",
8 visibility = ["//visibility:private"],
9 deps = [
Serge Bazanski97b5cd72023-07-28 17:14:50 +000010 "//devtools/depotview/proto",
11 "//devtools/depotview/service",
12 "//go/mirko",
13 "@com_github_golang_glog//:glog",
Sergiusz Bazanski4c0e9b52020-04-08 22:42:33 +020014 ],
15)
16
17go_binary(
18 name = "depotview",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000019 embed = [":depotview_lib"],
Sergiusz Bazanski4c0e9b52020-04-08 22:42:33 +020020 visibility = ["//visibility:public"],
21)
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020022
23container_layer(
24 name = "layer_bin",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000025 directory = "/devtools/",
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020026 files = [
27 ":depotview",
28 ],
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020029)
30
31container_image(
32 name = "runtime",
33 base = "@prodimage-bionic//image",
34 layers = [
35 ":layer_bin",
36 ],
37)
38
39container_push(
40 name = "push",
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020041 format = "Docker",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000042 image = ":runtime",
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020043 registry = "registry.k0.hswaw.net",
Serge Bazanskifb8a5ce2020-11-27 09:37:49 +000044 repository = "q3k/depotview",
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020045 tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
46)