Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 1 | load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| 2 | load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push") |
| 3 | |
| 4 | go_library( |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 5 | name = "capacifier_lib", |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 6 | srcs = ["capacifier.go"], |
| 7 | importpath = "code.hackerspace.pl/hscloud/hswaw/capacifier", |
| 8 | visibility = ["//visibility:private"], |
| 9 | deps = [ |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 10 | "@com_github_go_ldap_ldap_v3//:ldap", |
| 11 | "@com_github_golang_glog//:glog", |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 12 | ], |
| 13 | ) |
| 14 | |
| 15 | go_binary( |
| 16 | name = "capacifier", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 17 | embed = [":capacifier_lib"], |
Serge Bazanski | 4768e2f | 2023-10-28 17:31:13 +0000 | [diff] [blame] | 18 | pure = "on", |
| 19 | static = "on", |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 20 | visibility = ["//visibility:public"], |
| 21 | ) |
| 22 | |
| 23 | container_layer( |
| 24 | name = "layer_bin", |
| 25 | directory = "/hswaw/capacifier/", |
| 26 | files = [ |
| 27 | ":capacifier", |
| 28 | ], |
| 29 | ) |
| 30 | |
| 31 | container_image( |
| 32 | name = "runtime", |
| 33 | base = "@prodimage-bionic//image", |
| 34 | layers = [ |
| 35 | ":layer_bin", |
| 36 | ], |
| 37 | ) |
| 38 | |
| 39 | container_push( |
| 40 | name = "push", |
| 41 | format = "Docker", |
| 42 | image = ":runtime", |
| 43 | registry = "registry.k0.hswaw.net", |
| 44 | repository = "q3k/capacifier", |
Serge Bazanski | 4768e2f | 2023-10-28 17:31:13 +0000 | [diff] [blame] | 45 | tag = "1698514087", |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 46 | ) |