2020-04-28 21:45:06 +00:00
|
|
|
load("//tools:defs.bzl", "build_test", "gazelle", "go_path")
|
2020-10-26 18:09:34 +00:00
|
|
|
load("//tools/nogo:defs.bzl", "nogo_config")
|
2021-01-05 18:40:58 +00:00
|
|
|
load("//tools/yamltest:defs.bzl", "yaml_test")
|
2020-04-28 05:24:58 +00:00
|
|
|
load("//website:defs.bzl", "doc")
|
2019-04-05 00:04:30 +00:00
|
|
|
|
2020-01-27 18:04:07 +00:00
|
|
|
package(licenses = ["notice"])
|
|
|
|
|
2020-04-28 21:45:06 +00:00
|
|
|
exports_files(["LICENSE"])
|
|
|
|
|
2020-10-26 18:09:34 +00:00
|
|
|
nogo_config(
|
|
|
|
name = "nogo_config",
|
|
|
|
srcs = ["nogo.yaml"],
|
|
|
|
visibility = ["//:sandbox"],
|
|
|
|
)
|
|
|
|
|
2020-04-28 05:24:58 +00:00
|
|
|
doc(
|
|
|
|
name = "contributing",
|
|
|
|
src = "CONTRIBUTING.md",
|
|
|
|
category = "Project",
|
|
|
|
permalink = "/contributing/",
|
|
|
|
visibility = ["//website:__pkg__"],
|
|
|
|
weight = "20",
|
|
|
|
)
|
|
|
|
|
|
|
|
doc(
|
|
|
|
name = "security",
|
|
|
|
src = "SECURITY.md",
|
|
|
|
category = "Project",
|
|
|
|
permalink = "/security/",
|
|
|
|
visibility = ["//website:__pkg__"],
|
|
|
|
weight = "30",
|
|
|
|
)
|
|
|
|
|
|
|
|
doc(
|
|
|
|
name = "governance",
|
|
|
|
src = "GOVERNANCE.md",
|
|
|
|
category = "Project",
|
|
|
|
permalink = "/community/governance/",
|
|
|
|
subcategory = "Community",
|
|
|
|
visibility = ["//website:__pkg__"],
|
2020-08-04 08:05:42 +00:00
|
|
|
weight = "20",
|
2020-04-28 05:24:58 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
doc(
|
|
|
|
name = "code_of_conduct",
|
|
|
|
src = "CODE_OF_CONDUCT.md",
|
|
|
|
category = "Project",
|
|
|
|
permalink = "/community/code_of_conduct/",
|
|
|
|
subcategory = "Community",
|
|
|
|
visibility = ["//website:__pkg__"],
|
|
|
|
weight = "99",
|
|
|
|
)
|
|
|
|
|
2021-01-05 18:40:58 +00:00
|
|
|
yaml_test(
|
|
|
|
name = "nogo_config_test",
|
|
|
|
srcs = glob(["nogo*.yaml"]),
|
|
|
|
schema = "//tools/nogo:config-schema.json",
|
|
|
|
)
|
|
|
|
|
|
|
|
yaml_test(
|
|
|
|
name = "github_workflows_test",
|
|
|
|
srcs = glob([".github/workflows/*.yml"]),
|
|
|
|
schema = "@github_workflow_schema//file",
|
|
|
|
)
|
|
|
|
|
|
|
|
yaml_test(
|
|
|
|
name = "buildkite_pipelines_test",
|
|
|
|
srcs = glob([".buildkite/*.yaml"]),
|
|
|
|
schema = "@buildkite_pipeline_schema//file",
|
|
|
|
)
|
|
|
|
|
2018-04-27 17:37:02 +00:00
|
|
|
# The sandbox filegroup is used for sandbox-internal dependencies.
|
|
|
|
package_group(
|
|
|
|
name = "sandbox",
|
2020-04-28 21:45:06 +00:00
|
|
|
packages = ["//..."],
|
|
|
|
)
|
|
|
|
|
|
|
|
# For targets that will not normally build internally, we ensure that they are
|
|
|
|
# least build by a static BUILD test.
|
|
|
|
build_test(
|
|
|
|
name = "build_test",
|
|
|
|
targets = [
|
|
|
|
"//test/e2e:integration_test",
|
|
|
|
"//test/image:image_test",
|
|
|
|
"//test/root:root_test",
|
2020-11-10 19:25:17 +00:00
|
|
|
"//test/benchmarks/base:startup_test",
|
|
|
|
"//test/benchmarks/base:size_test",
|
|
|
|
"//test/benchmarks/base:sysbench_test",
|
2020-12-09 19:55:06 +00:00
|
|
|
"//test/benchmarks/database:redis_test",
|
2020-11-10 19:25:17 +00:00
|
|
|
"//test/benchmarks/fs:bazel_test",
|
|
|
|
"//test/benchmarks/fs:fio_test",
|
2020-12-09 19:55:06 +00:00
|
|
|
"//test/benchmarks/media:ffmpeg_test",
|
|
|
|
"//test/benchmarks/ml:tensorflow_test",
|
2020-12-09 21:49:41 +00:00
|
|
|
"//test/benchmarks/network:httpd_test",
|
|
|
|
"//test/benchmarks/network:nginx_test",
|
|
|
|
"//test/benchmarks/network:node_test",
|
|
|
|
"//test/benchmarks/network:ruby_test",
|
2018-04-27 17:37:02 +00:00
|
|
|
],
|
|
|
|
)
|
2019-04-05 00:04:30 +00:00
|
|
|
|
|
|
|
# gopath defines a directory that is structured in a way that is compatible
|
|
|
|
# with standard Go tools. Things like godoc, editors and refactor tools should
|
|
|
|
# work as expected.
|
|
|
|
#
|
|
|
|
# The files in this tree are symlinks to the true sources.
|
|
|
|
go_path(
|
|
|
|
name = "gopath",
|
|
|
|
mode = "link",
|
|
|
|
deps = [
|
2020-10-19 23:26:42 +00:00
|
|
|
# Main binaries.
|
|
|
|
#
|
|
|
|
# For reasons related to reproducibility of the generated
|
|
|
|
# files, in order to ensure that :gopath produces only a
|
|
|
|
# a single "pure" version of all files, we can only depend
|
|
|
|
# on go_library targets here, and not go_binary. Thus the
|
|
|
|
# binaries have been factored into a cli package, which is
|
|
|
|
# a good practice in any case.
|
|
|
|
"//runsc/cli",
|
2021-01-13 01:50:33 +00:00
|
|
|
"//shim/cli",
|
2020-10-30 19:00:11 +00:00
|
|
|
"//webhook/pkg/cli",
|
2019-10-08 20:00:06 +00:00
|
|
|
|
2020-10-19 23:26:42 +00:00
|
|
|
# Packages that are not dependencies of the above.
|
2019-12-11 21:26:30 +00:00
|
|
|
"//pkg/sentry/kernel/memevent",
|
|
|
|
"//pkg/tcpip/adapters/gonet",
|
2021-03-03 20:35:26 +00:00
|
|
|
"//pkg/tcpip/faketime",
|
2019-10-08 20:00:06 +00:00
|
|
|
"//pkg/tcpip/link/channel",
|
2020-12-23 00:19:17 +00:00
|
|
|
"//pkg/tcpip/link/ethernet",
|
2019-12-11 21:26:30 +00:00
|
|
|
"//pkg/tcpip/link/muxed",
|
2020-12-23 00:19:17 +00:00
|
|
|
"//pkg/tcpip/link/pipe",
|
2019-12-11 21:26:30 +00:00
|
|
|
"//pkg/tcpip/link/sharedmem",
|
|
|
|
"//pkg/tcpip/link/sharedmem/pipe",
|
|
|
|
"//pkg/tcpip/link/sharedmem/queue",
|
|
|
|
"//pkg/tcpip/link/tun",
|
|
|
|
"//pkg/tcpip/link/waitable",
|
|
|
|
"//pkg/tcpip/sample/tun_tcp_connect",
|
|
|
|
"//pkg/tcpip/sample/tun_tcp_echo",
|
|
|
|
"//pkg/tcpip/transport/tcpconntrack",
|
2019-04-05 00:04:30 +00:00
|
|
|
],
|
|
|
|
)
|
2019-06-02 06:09:26 +00:00
|
|
|
|
|
|
|
# gazelle is a set of build tools.
|
|
|
|
#
|
|
|
|
# To update the WORKSPACE from go.mod, use:
|
|
|
|
# bazel run //:gazelle -- update-repos -from_file=go.mod
|
|
|
|
gazelle(name = "gazelle")
|