Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 1 | load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push") |
Sergiusz Bazanski | c881cf3 | 2020-04-08 20:03:12 +0200 | [diff] [blame] | 2 | load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| 3 | |
| 4 | go_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 Bazanski | f157b4d | 2020-04-10 17:39:43 +0200 | [diff] [blame] | 14 | "//devtools/depotview/proto:go_default_library", |
Sergiusz Bazanski | c881cf3 | 2020-04-08 20:03:12 +0200 | [diff] [blame] | 15 | "//devtools/hackdoc/config:go_default_library", |
| 16 | "//devtools/hackdoc/source:go_default_library", |
Sergiusz Bazanski | f157b4d | 2020-04-10 17:39:43 +0200 | [diff] [blame] | 17 | "//go/mirko:go_default_library", |
| 18 | "//go/pki:go_default_library", |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 19 | "@com_github_gabriel_vasile_mimetype//:go_default_library", |
Sergiusz Bazanski | c881cf3 | 2020-04-08 20:03:12 +0200 | [diff] [blame] | 20 | "@com_github_golang_glog//:go_default_library", |
| 21 | "@in_gopkg_russross_blackfriday_v2//:go_default_library", |
Sergiusz Bazanski | f157b4d | 2020-04-10 17:39:43 +0200 | [diff] [blame] | 22 | "@org_golang_google_grpc//:go_default_library", |
Sergiusz Bazanski | c881cf3 | 2020-04-08 20:03:12 +0200 | [diff] [blame] | 23 | ], |
| 24 | ) |
| 25 | |
| 26 | go_binary( |
| 27 | name = "hackdoc", |
| 28 | embed = [":go_default_library"], |
| 29 | visibility = ["//visibility:public"], |
| 30 | ) |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 31 | |
| 32 | container_layer( |
| 33 | name = "layer_bin", |
| 34 | files = [ |
| 35 | ":hackdoc", |
| 36 | ], |
| 37 | directory = "/devtools/", |
| 38 | ) |
| 39 | |
| 40 | container_image( |
| 41 | name = "runtime", |
| 42 | base = "@prodimage-bionic//image", |
| 43 | layers = [ |
| 44 | ":layer_bin", |
| 45 | ], |
| 46 | ) |
| 47 | |
| 48 | container_push( |
| 49 | name = "push", |
| 50 | image = ":runtime", |
| 51 | format = "Docker", |
| 52 | registry = "registry.k0.hswaw.net", |
Serge Bazanski | 15db04c | 2020-08-10 18:55:22 +0200 | [diff] [blame] | 53 | repository = "q3k/hackdoc", |
Sergiusz Bazanski | 8adbd49 | 2020-04-10 21:20:53 +0200 | [diff] [blame] | 54 | tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}", |
| 55 | ) |