blob: 93dbe22bae0eef291cd8f20d3256eb18ce108426 [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 Bazanski4768e2f2023-10-28 17:31:13 +000018 pure = "on",
19 static = "on",
Serge Bazanski0aa29102023-04-01 23:18:05 +000020 visibility = ["//visibility:public"],
21)
22
23container_layer(
24 name = "layer_bin",
25 directory = "/hswaw/capacifier/",
26 files = [
27 ":capacifier",
28 ],
29)
30
31container_image(
32 name = "runtime",
33 base = "@prodimage-bionic//image",
34 layers = [
35 ":layer_bin",
36 ],
37)
38
39container_push(
40 name = "push",
41 format = "Docker",
42 image = ":runtime",
43 registry = "registry.k0.hswaw.net",
44 repository = "q3k/capacifier",
Serge Bazanski4768e2f2023-10-28 17:31:13 +000045 tag = "1698514087",
Serge Bazanski0aa29102023-04-01 23:18:05 +000046)