Skip to content

Commit

Permalink
Only use needed sources during module_compile
Browse files Browse the repository at this point in the history
Change-Id: I7215ce0c0fe0a99d113bbfc7ad5afa386ba5793a
  • Loading branch information
TimotheusBachinger committed Aug 29, 2024
1 parent 00a7d50 commit 7d55c94
Showing 1 changed file with 58 additions and 25 deletions.
83 changes: 58 additions & 25 deletions omd/packages/python3-modules/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,9 @@ config_setting(
srcs = [
"@freetds",
"@omd_packages//omd/packages/omd:use_system_openssl",
"@omd_packages//packages/cmk-agent-based:files",
"@omd_packages//packages/cmk-agent-receiver:files",
"@omd_packages//packages/cmk-crypto:files",
"@omd_packages//packages/cmk-graphing:files",
"@omd_packages//packages/cmk-livestatus-client:files",
"@omd_packages//packages/cmk-messaging:files",
"@omd_packages//packages/cmk-mkp-tool:files",
"@omd_packages//packages/cmk-rulesets:files",
"@omd_packages//packages/cmk-server-side-calls:files",
"@omd_packages//packages/cmk-trace:files",
"@omd_packages//packages/cmk-werks:files",
"@openssl",
"@python",
],
] + src,
outs = [
"compiled_%s.tar" % module,
],
Expand All @@ -87,21 +76,65 @@ config_setting(
requirements = dep,
),
}),
) for module, dep in [
("agent-receiver", "$(locations @omd_packages//packages/cmk-agent-receiver:files)"),
("crypto", "$(locations @omd_packages//packages/cmk-crypto:files)"),
("graphing", "$(locations @omd_packages//packages/cmk-graphing:files)"),
("rulesets", "$(locations @omd_packages//packages/cmk-rulesets:files)"),
("server-side-calls", "$(locations @omd_packages//packages/cmk-server-side-calls:files)"),
("werks", "$(locations @omd_packages//packages/cmk-werks:files)"),
("trace", "$(locations @omd_packages//packages/cmk-trace:files)"),
("agent-based", "$(locations @omd_packages//packages/cmk-agent-based:files)"),
("messaging", "$(locations @omd_packages//packages/cmk-messaging:files)"),
("mkp-tool", "$(locations @omd_packages//packages/cmk-mkp-tool:files)"),
("livestatus-client", "$(locations @omd_packages//packages/cmk-livestatus-client:files)"),
) for module, dep, src in [
(
"agent-receiver",
"$(locations @omd_packages//packages/cmk-agent-receiver:files)",
["@omd_packages//packages/cmk-agent-receiver:files"],
),
(
"crypto",
"$(locations @omd_packages//packages/cmk-crypto:files)",
["@omd_packages//packages/cmk-crypto:files"],
),
(
"graphing",
"$(locations @omd_packages//packages/cmk-graphing:files)",
["@omd_packages//packages/cmk-graphing:files"],
),
(
"rulesets",
"$(locations @omd_packages//packages/cmk-rulesets:files)",
["@omd_packages//packages/cmk-rulesets:files"],
),
(
"server-side-calls",
"$(locations @omd_packages//packages/cmk-server-side-calls:files)",
["@omd_packages//packages/cmk-server-side-calls:files"],
),
(
"werks",
"$(locations @omd_packages//packages/cmk-werks:files)",
["@omd_packages//packages/cmk-werks:files"],
),
(
"trace",
"$(locations @omd_packages//packages/cmk-trace:files)",
["@omd_packages//packages/cmk-trace:files"],
),
(
"agent-based",
"$(locations @omd_packages//packages/cmk-agent-based:files)",
["@omd_packages//packages/cmk-agent-based:files"],
),
(
"messaging",
"$(locations @omd_packages//packages/cmk-messaging:files)",
["@omd_packages//packages/cmk-messaging:files"],
),
(
"mkp-tool",
"$(locations @omd_packages//packages/cmk-mkp-tool:files)",
["@omd_packages//packages/cmk-mkp-tool:files"],
),
(
"livestatus-client",
"$(locations @omd_packages//packages/cmk-livestatus-client:files)",
["@omd_packages//packages/cmk-livestatus-client:files"],
),
# TODO: Switch to official release when netapp has fixed their build process
# See: https://github.com/NetApp/ontap-rest-python/issues/46
("netapp-ontap", "git+https://github.com/Checkmk/netapp-ontap-cmk.git@e38ce4ce357ad2ea8f47260c269757f8805bdbce"),
("netapp-ontap", "git+https://github.com/Checkmk/netapp-ontap-cmk.git@e38ce4ce357ad2ea8f47260c269757f8805bdbce", []),
]]

genrule(
Expand Down

0 comments on commit 7d55c94

Please sign in to comment.