blob: d3c4eea41dbae926523a53f2e3ccaae882d62cc2 [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 = "hackdoc_lib",
srcs = [
"helpers.go",
"main.go",
"markdown.go",
],
importpath = "code.hackerspace.pl/hscloud/devtools/hackdoc",
visibility = ["//visibility:private"],
deps = [
"//devtools/depotview/proto",
"//devtools/hackdoc/config",
"//devtools/hackdoc/source",
"//go/mirko",
"//go/pki",
"@com_github_gabriel_vasile_mimetype//:mimetype",
"@com_github_golang_glog//:glog",
"@com_github_russross_blackfriday_v2//:blackfriday",
"@org_golang_google_grpc//:go_default_library",
],
)
go_binary(
name = "hackdoc",
embed = [":hackdoc_lib"],
visibility = ["//visibility:public"],
)
container_layer(
name = "layer_bin",
directory = "/devtools/",
files = [
":hackdoc",
],
)
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/hackdoc",
tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
)