blob: f9e84060e7d6519946098f08bb484524d2a16309 [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 = "voucherchecker_lib",
srcs = ["main.go"],
importpath = "code.hackerspace.pl/hscloud/hswaw/voucherchecker",
visibility = ["//visibility:private"],
deps = ["@com_github_golang_glog//:glog"],
)
go_binary(
name = "voucherchecker",
embed = [":voucherchecker_lib"],
visibility = ["//visibility:public"],
)
container_layer(
name = "layer_bin",
directory = "/voucherchecker/",
files = [
":voucherchecker",
],
)
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/voucherchecker",
tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
)