| load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push") |
| load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| |
| go_library( |
| name = "go_default_library", |
| srcs = ["main.go"], |
| importpath = "code.hackerspace.pl/hscloud/cluster/identd", |
| visibility = ["//visibility:private"], |
| deps = [ |
| "//cluster/identd/ident:go_default_library", |
| "//cluster/identd/kubenat:go_default_library", |
| "//go/mirko:go_default_library", |
| "@com_github_golang_glog//:go_default_library", |
| "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library", |
| ], |
| ) |
| |
| go_binary( |
| name = "identd", |
| embed = [":go_default_library"], |
| visibility = ["//visibility:public"], |
| ) |
| |
| container_layer( |
| name = "layer_bin", |
| files = [ |
| ":identd", |
| ], |
| directory = "/cluster/identd/", |
| ) |
| |
| container_image( |
| name = "runtime", |
| base = "@prodimage-bionic//image", |
| layers = [ |
| ":layer_bin", |
| ], |
| entrypoint = "/cluster/identd/identd", |
| ) |
| |
| container_push( |
| name = "push", |
| image = ":runtime", |
| format = "Docker", |
| registry = "registry.k0.hswaw.net", |
| repository = "q3k/identd", |
| tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}", |
| ) |