blob: 689b92287b08a9ab7d7dbdc813ba3b6cfa7ab625 [file] [log] [blame]
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 = "identd_lib",
srcs = ["main.go"],
importpath = "code.hackerspace.pl/hscloud/cluster/identd",
visibility = ["//visibility:private"],
deps = [
"//cluster/identd/ident",
"//cluster/identd/kubenat",
"//go/mirko",
"@com_github_golang_glog//:glog",
"@io_k8s_apimachinery//pkg/apis/meta/v1:meta",
],
)
go_binary(
name = "identd",
embed = [":identd_lib"],
visibility = ["//visibility:public"],
)
container_layer(
name = "layer_bin",
directory = "/cluster/identd/",
files = [
":identd",
],
)
container_image(
name = "runtime",
base = "@prodimage-bionic//image",
entrypoint = "/cluster/identd/identd",
layers = [
":layer_bin",
],
)
container_push(
name = "push",
format = "Docker",
image = ":runtime",
registry = "registry.k0.hswaw.net",
repository = "q3k/identd",
tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
)