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