Skip to content

Commit

Permalink
Enable auto-generating sources rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ixdy committed Jan 5, 2017
1 parent f8288ed commit 20d221f
Show file tree
Hide file tree
Showing 1,002 changed files with 14,557 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gazelcfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"./test",
"./federation",
"./examples"
]
],
"AddSourcesRules": true
}
28 changes: 28 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,31 @@ gcs_upload(
"//build/debs",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"], exclude=["bazel-*/**", ".git/**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//api:all-srcs",
"//build:all-srcs",
"//cluster:all-srcs",
"//cmd:all-srcs",
"//docs:all-srcs",
"//examples:all-srcs",
"//federation:all-srcs",
"//hack:all-srcs",
"//pkg:all-srcs",
"//plugin:all-srcs",
"//test:all-srcs",
"//third_party:all-srcs",
"//vendor:all-srcs",
],
tags = ["automanaged"],
)
17 changes: 17 additions & 0 deletions api/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
package(default_visibility = ["//visibility:public"])

licenses(["notice"])

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//api/openapi-spec:all-srcs",
"//api/swagger-spec:all-srcs",
],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions api/openapi-spec/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@ filegroup(
"**/*.json",
]),
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions api/swagger-spec/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@ filegroup(
"**/*.json",
]),
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
16 changes: 16 additions & 0 deletions build/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,19 @@ docker_build(
],
repository = "gcr.io/google-containers",
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//build/debs:all-srcs",
],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions build/debs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,16 @@ k8s_deb(
The Container Networking Interface tools for provisioning container networks.
""",
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
16 changes: 16 additions & 0 deletions cluster/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
package(default_visibility = ["//visibility:public"])

licenses(["notice"])

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//cluster/addons:all-srcs",
],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cluster/addons/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,16 @@ pkg_tar(
],
strip_prefix = ".",
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
47 changes: 47 additions & 0 deletions cmd/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
package(default_visibility = ["//visibility:public"])

licenses(["notice"])

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//cmd/clicheck:all-srcs",
"//cmd/cloud-controller-manager:all-srcs",
"//cmd/gendocs:all-srcs",
"//cmd/genkubedocs:all-srcs",
"//cmd/genman:all-srcs",
"//cmd/genslateyaml:all-srcs",
"//cmd/genswaggertypedocs:all-srcs",
"//cmd/genutils:all-srcs",
"//cmd/genyaml:all-srcs",
"//cmd/hyperkube:all-srcs",
"//cmd/kube-apiserver:all-srcs",
"//cmd/kube-controller-manager:all-srcs",
"//cmd/kube-discovery:all-srcs",
"//cmd/kube-dns:all-srcs",
"//cmd/kube-proxy:all-srcs",
"//cmd/kubeadm:all-srcs",
"//cmd/kubectl:all-srcs",
"//cmd/kubelet:all-srcs",
"//cmd/kubemark:all-srcs",
"//cmd/kubernetes-discovery:all-srcs",
"//cmd/libs/go2idl/client-gen:all-srcs",
"//cmd/libs/go2idl/conversion-gen:all-srcs",
"//cmd/libs/go2idl/deepcopy-gen:all-srcs",
"//cmd/libs/go2idl/defaulter-gen:all-srcs",
"//cmd/libs/go2idl/go-to-protobuf:all-srcs",
"//cmd/libs/go2idl/import-boss:all-srcs",
"//cmd/libs/go2idl/informer-gen:all-srcs",
"//cmd/libs/go2idl/lister-gen:all-srcs",
"//cmd/libs/go2idl/openapi-gen:all-srcs",
"//cmd/libs/go2idl/set-gen:all-srcs",
"//cmd/linkcheck:all-srcs",
"//cmd/mungedocs:all-srcs",
],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/clicheck/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,16 @@ go_library(
"//pkg/kubectl/cmd/util/sanity:go_default_library",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
16 changes: 16 additions & 0 deletions cmd/cloud-controller-manager/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,19 @@ go_library(
"//vendor:k8s.io/apiserver/pkg/healthz",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//cmd/cloud-controller-manager/app:all-srcs",
],
tags = ["automanaged"],
)
16 changes: 16 additions & 0 deletions cmd/cloud-controller-manager/app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,19 @@ go_library(
"//vendor:k8s.io/apiserver/pkg/healthz",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//cmd/cloud-controller-manager/app/options:all-srcs",
],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/cloud-controller-manager/app/options/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,16 @@ go_library(
"//vendor:github.com/spf13/pflag",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/gendocs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,16 @@ go_library(
"//vendor:github.com/spf13/cobra/doc",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/genkubedocs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@ go_library(
"//vendor:github.com/spf13/cobra/doc",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/genman/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,16 @@ go_library(
"//vendor:github.com/spf13/pflag",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/genslateyaml/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,16 @@ go_library(
"//vendor:gopkg.in/yaml.v2",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/genswaggertypedocs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,16 @@ go_library(
"//vendor:github.com/spf13/pflag",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/genutils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,16 @@ go_test(
library = ":go_default_library",
tags = ["automanaged"],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
Loading

0 comments on commit 20d221f

Please sign in to comment.