...
1load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
2load("//hack/build/rules/container:index.bzl", "container_push", "go_oci_image")
3
4go_binary(
5 name = "authproxy",
6 data = [
7 ":envfile",
8 ],
9 embed = [":auth-proxy"],
10 visibility = ["//visibility:public"],
11)
12
13# create a filegroup to wrap the .env file, which may or may not exist
14# consumers that would use .env directly as a data dep can just reference this
15# target instead
16filegroup(
17 name = "envfile",
18 # buildifier: disable=constant-glob
19 srcs = glob([".env"]),
20 visibility = ["//visibility:public"],
21)
22
23go_oci_image(
24 name = "auth_proxy_container",
25 embed = [":auth-proxy"],
26 tags = ["manual"],
27)
28
29container_push(
30 name = "container_push",
31 image = ":auth_proxy_container",
32 image_name = "auth-proxy",
33 repository_file = "//hack/build/rules/container:workloads-repo",
34 visibility = ["//visibility:public"],
35)
36
37go_library(
38 name = "auth-proxy",
39 srcs = ["server.go"],
40 importpath = "edge-infra.dev/cmd/edge/auth-proxy",
41 visibility = ["//visibility:private"],
42 deps = [
43 "//pkg/edge/auth-proxy",
44 "@com_github_joho_godotenv//:godotenv",
45 ],
46)
View as plain text