forked from Kong/kong
-
Notifications
You must be signed in to change notification settings - Fork 2
/
BUILD.bazel
83 lines (74 loc) · 1.92 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
load("//build/nfpm:rules.bzl", "nfpm_pkg")
filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)
genrule(
name = "kong",
outs = ["kong.log"],
cmd = """
export KONG_DISTRIBUTION_PATH=`pwd`/distribution;
if [ -e "/.dockerenv" ]; then
bash scripts/build-kong.sh > $@
else
rootlesskit --copy-up=/usr/local bash scripts/build-kong.sh > $@
fi
find /tmp/build/usr/local/kong /tmp/build/usr/local/openresty -type f -name '*.a' -delete
""",
visibility = ["//visibility:public"],
)
nfpm_pkg(
name = "kong_deb",
out = "pkg/kong.deb",
config = "build/package/nfpm.yaml",
packager = "deb",
visibility = ["//visibility:public"],
)
nfpm_pkg(
name = "kong_apk",
out = "pkg/kong.apk.tar.gz",
config = "build/package/nfpm.yaml",
packager = "apk",
visibility = ["//visibility:public"],
)
nfpm_pkg(
name = "kong_el8",
out = "pkg/kong.el8.rpm",
config = "build/package/nfpm.yaml",
packager = "rpm",
visibility = ["//visibility:public"],
)
nfpm_pkg(
name = "kong_el7",
out = "pkg/kong.el7.rpm",
config = "build/package/nfpm.yaml",
env = {
"RPM_EXTRA_DEPS": "hostname",
},
packager = "rpm",
visibility = ["//visibility:public"],
)
nfpm_pkg(
name = "kong_aws2",
out = "pkg/kong.aws2.rpm",
config = "build/package/nfpm.yaml",
env = {
"RPM_EXTRA_DEPS": "/usr/sbin/useradd",
"RPM_EXTRA_DEPS_2": "/usr/sbin/groupadd",
},
packager = "rpm",
visibility = ["//visibility:public"],
)
nfpm_pkg(
name = "kong_aws2022",
out = "pkg/kong.aws2022.rpm",
config = "build/package/nfpm.yaml",
env = {
"RPM_EXTRA_DEPS": "/usr/sbin/useradd",
"RPM_EXTRA_DEPS_2": "/usr/sbin/groupadd",
"RPM_EXTRA_DEPS_3": "libxcrypt-compat",
},
packager = "rpm",
visibility = ["//visibility:public"],
)