1load("//hack/tools/bzl:index.bzl", "platforms", "tool")
2
3package(default_visibility = ["//visibility:public"])
4
5# call platforms() to make config_settings for OSX and Linux platforms
6# available to our `tool` macro
7platforms()
8
9tool(
10 name = "fetch_buildifier",
11 outs = ["buildifier"],
12 darwin = "@buildifier_osx//file",
13 k8 = "@buildifier_linux//file",
14 m1 = "@buildifier_m1//file",
15 tags = ["manual"],
16)
17
18tool(
19 name = "fetch_buildozer",
20 outs = ["buildozer"],
21 darwin = "@buildozer_osx//file",
22 k8 = "@buildozer_linux//file",
23 m1 = "@buildozer_m1//file",
24 tags = ["manual"],
25)
26
27tool(
28 name = "fetch_kustomize",
29 outs = ["kustomize"],
30 darwin = "@kustomize_osx//:file",
31 k8 = "@kustomize_linux//:file",
32 m1 = "@kustomize_m1//:file",
33 tags = ["manual"],
34)
35
36tool(
37 name = "fetch_helm",
38 outs = ["helm"],
39 darwin = "@helm_osx//:file",
40 k8 = "@helm_linux//:file",
41 m1 = "@helm_m1//:file",
42 tags = ["manual"],
43)
44
45tool(
46 name = "fetch_kpt",
47 outs = ["kpt"],
48 darwin = "@kpt_osx//:file",
49 k8 = "@kpt_linux//:file",
50 m1 = "@kpt_m1//:file",
51 tags = ["manual"],
52)
53
54tool(
55 name = "fetch_kubebuilder",
56 outs = [
57 "etcd",
58 "kube-apiserver",
59 "kubectl",
60 ],
61 cmd = "cp $(SRCS) $(RULEDIR)",
62 darwin = "@kubebuilder_tools_osx//:files",
63 k8 = "@kubebuilder_tools_linux//:files",
64 m1 = "@kubebuilder_tools_m1//:files",
65 tags = ["manual"],
66)
67
68tool(
69 name = "fetch_golangci_lint",
70 outs = [
71 "golangci-lint",
72 ],
73 darwin = "@golangci_lint_darwin_amd64//:file",
74 k8 = "@golangci_lint_linux//:file",
75 m1 = "@golangci_lint_m1//:file",
76 tags = ["manual"],
77)
78
79tool(
80 name = "fetch_yq",
81 outs = ["yq"],
82 darwin = "@yq_osx//file",
83 k8 = "@yq_linux//file",
84 m1 = "@yq_m1//file",
85 tags = ["manual"],
86)
87
88tool(
89 name = "fetch_kind",
90 outs = ["kind"],
91 darwin = "@kind_osx//file",
92 k8 = "@kind_linux//file",
93 m1 = "@kind_m1//file",
94 tags = ["manual"],
95)
96
97tool(
98 name = "fetch_k3d",
99 outs = ["k3d"],
100 darwin = "@k3d_osx//file",
101 k8 = "@k3d_linux//file",
102 m1 = "@k3d_m1//file",
103 tags = ["manual"],
104)
105
106tool(
107 name = "fetch_sonobuoy",
108 outs = ["sonobuoy"],
109 darwin = "@sonobuoy_osx//:file",
110 k8 = "@sonobuoy_linux//:file",
111 m1 = "@sonobuoy_m1//:file",
112 tags = ["manual"],
113)
114
115tool(
116 name = "fetch_argo",
117 outs = ["argo"],
118 darwin = "//hack/tools:gunzip-argo-darwin",
119 k8 = "//hack/tools:gunzip-argo-k8s",
120 m1 = "//hack/tools:gunzip-argo-m1",
121 tags = ["manual"],
122)
123
124genrule(
125 name = "gunzip-argo-k8s",
126 srcs = ["@argo_linux//file"],
127 outs = ["k8s_argo"],
128 cmd = """
129 gunzip -f -c $(SRCS) > $(RULEDIR)/k8s_argo
130 """,
131)
132
133genrule(
134 name = "gunzip-argo-m1",
135 srcs = ["@argo_m1//file"],
136 outs = ["m1_argo"],
137 cmd = """
138 gunzip -f -c $(SRCS) > $(RULEDIR)/m1_argo
139 """,
140)
141
142genrule(
143 name = "gunzip-argo-darwin",
144 srcs = ["@argo_osx//file"],
145 outs = ["darwin_argo"],
146 cmd = """
147 gunzip -f -c $(SRCS) > $(RULEDIR)/darwin_argo
148 """,
149)
150
151tool(
152 name = "fetch_lua",
153 outs = ["lua"],
154 darwin = "@luajit_osx//:install_luajit_mac",
155 k8 = "@luajit_linux//:install_luajit_linux",
156 m1 = "@luajit_m1//:install_luajit_m1",
157 tags = ["manual"],
158)
159
160tool(
161 name = "fetch_fluxcd",
162 outs = ["flux"],
163 darwin = "@fluxcd_cli_osx//:file",
164 k8 = "@fluxcd_cli_linux//:file",
165 m1 = "@fluxcd_cli_m1//:file",
166 tags = ["manual"],
167)
168
169tool(
170 name = "fetch_cloud_sql_proxy",
171 outs = ["cloud_sql_proxy"],
172 darwin = "@cloud_sql_proxy_osx//file",
173 k8 = "@cloud_sql_proxy_linux//file",
174 m1 = "@cloud_sql_proxy_m1//file",
175 tags = ["manual"],
176)
177
178tool(
179 name = "fetch_kubeval",
180 outs = ["kubeval"],
181 darwin = "@kubeval_osx//:file",
182 k8 = "@kubeval_linux//:file",
183 m1 = "@kubeval_m1//:file",
184)
185
186tool(
187 name = "fetch_embedded_postgres",
188 outs = ["postgres.txz"],
189 darwin = "@embedded_postgres_osx//:file",
190 k8 = "@embedded_postgres_linux//:file",
191 m1 = "@embedded_postgres_m1//:file",
192 tags = ["manual"],
193)
194
195tool(
196 name = "fetch_crdoc",
197 outs = ["crdoc"],
198 darwin = "@crdoc_osx//:file",
199 k8 = "@crdoc_linux//:file",
200 m1 = "@crdoc_m1//:file",
201 tags = ["manual"],
202)
203
204tool(
205 name = "fetch_golang_migrate",
206 outs = ["golang_migrate"],
207 darwin = "@golang_migrate_darwin_amd64//:file",
208 k8 = "@golang_migrate_linux_amd64//:file",
209 m1 = "@golang_migrate_darwin_arm64//:file",
210 tags = ["manual"],
211)
212
213tool(
214 name = "fetch_target_determinator",
215 outs = ["target-determinator"],
216 darwin = "@target_determinator_darwin//file",
217 k8 = "@target_determinator_linux//file",
218 m1 = "@target_determinator_m1//file",
219 tags = ["manual"],
220)
221
222tool(
223 name = "fetch_apko",
224 outs = ["apko"],
225 darwin = "@apko_darwin_amd64//:file",
226 k8 = "@apko_linux_amd64//:file",
227 m1 = "@apko_darwin_arm64//:file",
228 tags = ["manual"],
229)
230
231filegroup(
232 name = "package-srcs",
233 srcs = glob(["**"]),
234 tags = ["automanaged"],
235 visibility = ["//visibility:private"],
236)
237
238filegroup(
239 name = "all-srcs",
240 srcs = [":package-srcs"],
241 tags = ["automanaged"],
242 visibility = ["//visibility:public"],
243)
View as plain text