blob: da61781d94eef802ae5d7b3cf146af062b63e99d [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 = "shipstuck_lib",
srcs = ["main.go"],
importpath = "code.hackerspace.pl/hscloud/personal/q3k/shipstuck",
visibility = ["//visibility:private"],
deps = [
"//go/mirko",
"//personal/q3k/shipstuck/proto",
"@com_github_golang_glog//:glog",
"@com_github_grpc_ecosystem_grpc_gateway//runtime:go_default_library", # keep
],
)
go_binary(
name = "shipstuck",
embed = [":shipstuck_lib"],
visibility = ["//visibility:public"],
)
container_layer(
name = "layer_bin",
directory = "/personal/q3k/",
files = [
":shipstuck",
],
)
container_image(
name = "runtime",
base = "@prodimage-bionic//image",
layers = [
":layer_bin",
],
)
container_push(
name = "push",
format = "Docker",
image = ":runtime",
registry = "registry.k0.hswaw.net",
repository = "q3k/shipstuck",
tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
)