blob: 769051c4357cf9b1a0b3b71767e9548176009af4 [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 = "oodviewer_lib",
srcs = [
"app.go",
"main.go",
"views.go",
],
importpath = "code.hackerspace.pl/hscloud/hswaw/oodviewer",
visibility = ["//visibility:private"],
deps = [
"//hswaw/oodviewer/templates",
"@com_github_golang_glog//:glog",
"@com_github_lib_pq//:pq",
],
)
go_binary(
name = "oodviewer",
embed = [":oodviewer_lib"],
visibility = ["//visibility:public"],
)
container_layer(
name = "layer_bin",
directory = "/hswaw/",
files = [
":oodviewer",
],
)
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/oodviewer",
tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
)