-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathBUILD.bazel
More file actions
82 lines (74 loc) · 2.09 KB
/
Copy pathBUILD.bazel
File metadata and controls
82 lines (74 loc) · 2.09 KB
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
"""Agent assets - typically configuration files that ship with the product."""
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@rules_pkg//pkg:install.bzl", "pkg_install")
load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files")
load("//packages/agent:defs.bzl", "ETC_DIR_SELECTOR")
pkg_files(
name = "config_files",
srcs = [
"//pkg/config:system_probe_config",
] + select({
"//packages/agent:iot_flavor": [
"//pkg/config:iot_agent_config",
],
"//conditions:default": [
"//pkg/config:agent_config",
],
}),
attributes = pkg_attributes(mode = "0644"),
prefix = select(ETC_DIR_SELECTOR),
renames = select({
"//packages/agent:iot_flavor": {"//pkg/config:iot_agent_config": "datadog.yaml"},
"//conditions:default": None,
}),
visibility = ["//packages/agent:__subpackages__"],
)
pkg_filegroup(
name = "all_files",
srcs = [
":config_files",
"//cmd/agent/dist/conf.d:all_files",
],
visibility = ["//packages/agent:__subpackages__"],
)
pkg_install(
name = "install",
srcs = [
":all_files",
],
)
pkg_files(
name = "python_files",
srcs = [
"config.py",
],
attributes = pkg_attributes(mode = "0644"),
prefix = select(ETC_DIR_SELECTOR),
)
pkg_filegroup(
name = "all_python_files",
srcs = [
":python_files",
"//cmd/agent/dist/checks:python_files",
"//cmd/agent/dist/utils:python_files",
"//cmd/agent/dist/setup:python_files",
],
visibility = [
"//cmd/agent:__subpackages__",
"//packages/agent:__subpackages__",
],
)
pkg_install(
name = "python_install",
srcs = [
":all_python_files",
],
)
# We keep two copies so we don't need symlink support on windows.
# No worries eventually the python version will go away
diff_test(
name = "core_checks_list_sync_test",
failure_message = "core_checks.py and core_checks.bzl must be identical files",
file1 = "//tasks:core_checks.py",
file2 = "core_checks.bzl",
)