blob: 8956ae51d1ab7abe2e01d3e416d7bd1749ff7c79 [file] [log] [blame]
Serge Bazanski0aa29102023-04-01 23:18:05 +00001load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
2load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push")
3
4go_library(
Serge Bazanski97b5cd72023-07-28 17:14:50 +00005 name = "capacifier_lib",
Serge Bazanski0aa29102023-04-01 23:18:05 +00006 srcs = ["capacifier.go"],
7 importpath = "code.hackerspace.pl/hscloud/hswaw/capacifier",
8 visibility = ["//visibility:private"],
9 deps = [
Serge Bazanski97b5cd72023-07-28 17:14:50 +000010 "@com_github_go_ldap_ldap_v3//:ldap",
11 "@com_github_golang_glog//:glog",
Serge Bazanski0aa29102023-04-01 23:18:05 +000012 ],
13)
14
15go_binary(
16 name = "capacifier",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000017 embed = [":capacifier_lib"],
Serge Bazanski0aa29102023-04-01 23:18:05 +000018 visibility = ["//visibility:public"],
19)
20
21container_layer(
22 name = "layer_bin",
23 directory = "/hswaw/capacifier/",
24 files = [
25 ":capacifier",
26 ],
27)
28
29container_image(
30 name = "runtime",
31 base = "@prodimage-bionic//image",
32 layers = [
33 ":layer_bin",
34 ],
35)
36
37container_push(
38 name = "push",
39 format = "Docker",
40 image = ":runtime",
41 registry = "registry.k0.hswaw.net",
42 repository = "q3k/capacifier",
43 tag = "1680390588",
44)