Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 1 | load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push") |
Sergiusz Bazanski | 4c0e9b5 | 2020-04-08 22:42:33 +0200 | [diff] [blame] | 2 | load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| 3 | |
| 4 | go_library( |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 5 | name = "depotview_lib", |
Sergiusz Bazanski | 4c0e9b5 | 2020-04-08 22:42:33 +0200 | [diff] [blame] | 6 | srcs = ["main.go"], |
| 7 | importpath = "code.hackerspace.pl/hscloud/devtools/depotview", |
| 8 | visibility = ["//visibility:private"], |
| 9 | deps = [ |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 10 | "//devtools/depotview/proto", |
| 11 | "//devtools/depotview/service", |
| 12 | "//go/mirko", |
| 13 | "@com_github_golang_glog//:glog", |
Sergiusz Bazanski | 4c0e9b5 | 2020-04-08 22:42:33 +0200 | [diff] [blame] | 14 | ], |
| 15 | ) |
| 16 | |
| 17 | go_binary( |
| 18 | name = "depotview", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 19 | embed = [":depotview_lib"], |
Sergiusz Bazanski | 4c0e9b5 | 2020-04-08 22:42:33 +0200 | [diff] [blame] | 20 | visibility = ["//visibility:public"], |
| 21 | ) |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 22 | |
| 23 | container_layer( |
| 24 | name = "layer_bin", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 25 | directory = "/devtools/", |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 26 | files = [ |
| 27 | ":depotview", |
| 28 | ], |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 29 | ) |
| 30 | |
| 31 | container_image( |
| 32 | name = "runtime", |
| 33 | base = "@prodimage-bionic//image", |
| 34 | layers = [ |
| 35 | ":layer_bin", |
| 36 | ], |
| 37 | ) |
| 38 | |
| 39 | container_push( |
| 40 | name = "push", |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 41 | format = "Docker", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 42 | image = ":runtime", |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 43 | registry = "registry.k0.hswaw.net", |
Serge Bazanski | fb8a5ce | 2020-11-27 09:37:49 +0000 | [diff] [blame] | 44 | repository = "q3k/depotview", |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 45 | tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}", |
| 46 | ) |