blob: 186b0efbd522c4bd39998ffe300feed04f5879f2 [file] [log] [blame]
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +02001load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push")
Sergiusz Bazanskic881cf32020-04-08 20:03:12 +02002load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
3
4go_library(
5 name = "go_default_library",
6 srcs = [
7 "helpers.go",
8 "main.go",
9 "markdown.go",
10 ],
11 importpath = "code.hackerspace.pl/hscloud/devtools/hackdoc",
12 visibility = ["//visibility:private"],
13 deps = [
Sergiusz Bazanskif157b4d2020-04-10 17:39:43 +020014 "//devtools/depotview/proto:go_default_library",
Sergiusz Bazanskic881cf32020-04-08 20:03:12 +020015 "//devtools/hackdoc/config:go_default_library",
16 "//devtools/hackdoc/source:go_default_library",
Sergiusz Bazanskif157b4d2020-04-10 17:39:43 +020017 "//go/mirko:go_default_library",
18 "//go/pki:go_default_library",
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020019 "@com_github_gabriel_vasile_mimetype//:go_default_library",
Sergiusz Bazanskic881cf32020-04-08 20:03:12 +020020 "@com_github_golang_glog//:go_default_library",
21 "@in_gopkg_russross_blackfriday_v2//:go_default_library",
Sergiusz Bazanskif157b4d2020-04-10 17:39:43 +020022 "@org_golang_google_grpc//:go_default_library",
Sergiusz Bazanskic881cf32020-04-08 20:03:12 +020023 ],
24)
25
26go_binary(
27 name = "hackdoc",
28 embed = [":go_default_library"],
29 visibility = ["//visibility:public"],
30)
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020031
32container_layer(
33 name = "layer_bin",
34 files = [
35 ":hackdoc",
36 ],
37 directory = "/devtools/",
38)
39
40container_image(
41 name = "runtime",
42 base = "@prodimage-bionic//image",
43 layers = [
44 ":layer_bin",
45 ],
46)
47
48container_push(
49 name = "push",
50 image = ":runtime",
51 format = "Docker",
52 registry = "registry.k0.hswaw.net",
Serge Bazanski15db04c2020-08-10 18:55:22 +020053 repository = "q3k/hackdoc",
Sergiusz Bazanski8adbd492020-04-10 21:20:53 +020054 tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
55)