blob: fb0c344f0dc3bb9a71513351c42e19b2a63f5c4d [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 = "go_default_library",
srcs = ["main.go"],
importpath = "code.hackerspace.pl/hscloud/games/factorio/modproxy",
visibility = ["//visibility:private"],
deps = [
"//games/factorio/modproxy/modportal:go_default_library",
"//games/factorio/modproxy/proto:go_default_library",
"//go/mirko:go_default_library",
"@com_github_golang_glog//:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//status:go_default_library",
],
)
go_binary(
name = "modproxy",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)
container_layer(
name = "layer_bin",
files = [
":modproxy",
"//games/factorio/modproxy/client:client",
],
directory = "/games/factorio/modproxy/",
)
container_image(
name = "runtime",
base = "@prodimage-bionic//image",
layers = [
":layer_bin",
],
)
container_push(
name = "push",
image = ":runtime",
format = "Docker",
registry = "registry.k0.hswaw.net",
repository = "games/factorio/modproxy",
tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
)