From 00a7d505cac6ac5101fbfb815813fa8ab8473e35 Mon Sep 17 00:00:00 2001 From: Timotheus Bachinger Date: Thu, 29 Aug 2024 10:34:33 +0200 Subject: [PATCH] Add filegroups for all cmk-packages Change-Id: I3c8417fd5567c34b6c514a3f9703d88cf27cd8df --- omd/packages/python3-modules/BUILD | 36 ++++++++++++++-------------- packages/cmk-agent-based/BUILD | 31 ++++++++++++++++++++++++ packages/cmk-crypto/BUILD | 21 ++++++++++++++++ packages/cmk-graphing/BUILD | 18 ++++++++++++++ packages/cmk-livestatus-client/BUILD | 12 ++++++++++ packages/cmk-messaging/BUILD | 15 ++++++++++++ packages/cmk-mkp-tool/BUILD | 21 ++++++++++++++++ packages/cmk-rulesets/BUILD | 22 +++++++++++++++++ packages/cmk-server-side-calls/BUILD | 15 ++++++++++++ packages/cmk-werks/BUILD | 22 +++++++++++++++++ 10 files changed, 195 insertions(+), 18 deletions(-) create mode 100644 packages/cmk-crypto/BUILD create mode 100644 packages/cmk-graphing/BUILD create mode 100644 packages/cmk-livestatus-client/BUILD create mode 100644 packages/cmk-messaging/BUILD create mode 100644 packages/cmk-mkp-tool/BUILD create mode 100644 packages/cmk-rulesets/BUILD create mode 100644 packages/cmk-server-side-calls/BUILD diff --git a/omd/packages/python3-modules/BUILD b/omd/packages/python3-modules/BUILD index e029c422b16..3ceafad476c 100644 --- a/omd/packages/python3-modules/BUILD +++ b/omd/packages/python3-modules/BUILD @@ -52,17 +52,17 @@ config_setting( srcs = [ "@freetds", "@omd_packages//omd/packages/omd:use_system_openssl", - "@omd_packages//packages:cmk-agent-based", - "@omd_packages//packages:cmk-crypto", - "@omd_packages//packages:cmk-graphing", - "@omd_packages//packages:cmk-livestatus-client", - "@omd_packages//packages:cmk-messaging", - "@omd_packages//packages:cmk-mkp-tool", - "@omd_packages//packages:cmk-rulesets", - "@omd_packages//packages:cmk-server-side-calls", - "@omd_packages//packages:cmk-werks", + "@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", ], @@ -89,16 +89,16 @@ config_setting( }), ) for module, dep in [ ("agent-receiver", "$(locations @omd_packages//packages/cmk-agent-receiver:files)"), - ("crypto", "$(execpath @omd_packages//packages:cmk-crypto)"), - ("graphing", "$(execpath @omd_packages//packages:cmk-graphing)"), - ("rulesets", "$(execpath @omd_packages//packages:cmk-rulesets)"), - ("server-side-calls", "$(execpath @omd_packages//packages:cmk-server-side-calls)"), - ("werks", "$(execpath @omd_packages//packages:cmk-werks)"), + ("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", "$(execpath @omd_packages//packages:cmk-agent-based)"), - ("messaging", "$(execpath @omd_packages//packages:cmk-messaging)"), - ("mkp-tool", "$(execpath @omd_packages//packages:cmk-mkp-tool)"), - ("livestatus-client", "$(execpath @omd_packages//packages:cmk-livestatus-client)"), + ("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)"), # 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"), diff --git a/packages/cmk-agent-based/BUILD b/packages/cmk-agent-based/BUILD index bc9d4133ada..059f6b411da 100644 --- a/packages/cmk-agent-based/BUILD +++ b/packages/cmk-agent-based/BUILD @@ -2,6 +2,37 @@ load("@aspect_rules_py//py:defs.bzl", "py_library", "py_pytest_main", "py_test") load("@cmk_agent_based//:requirements.bzl", "requirement") load("@rules_python//python:pip.bzl", "compile_pip_requirements") +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/agent_based/prediction_backend.py", + "cmk/agent_based/v1/__init__.py", + "cmk/agent_based/v1/_check_levels.py", + "cmk/agent_based/v1/_checking_classes.py", + "cmk/agent_based/v1/_detection.py", + "cmk/agent_based/v1/_inventory_classes.py", + "cmk/agent_based/v1/_regex.py", + "cmk/agent_based/v1/_snmp.py", + "cmk/agent_based/v1/_value_store_utils.py", + "cmk/agent_based/v1/clusterize.py", + "cmk/agent_based/v1/register.py", + "cmk/agent_based/v1/render.py", + "cmk/agent_based/v1/type_defs.py", + "cmk/agent_based/v1/value_store.py", + "cmk/agent_based/v2/__init__.py", + "cmk/agent_based/v2/_check_levels.py", + "cmk/agent_based/v2/_get_average.py", + "cmk/agent_based/v2/_plugins.py", + "cmk/agent_based/v2/clusterize.py", + "cmk/agent_based/v2/render.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) + compile_pip_requirements( name = "requirements", requirements_in = "pyproject.toml", diff --git a/packages/cmk-crypto/BUILD b/packages/cmk-crypto/BUILD new file mode 100644 index 00000000000..cd929a27f25 --- /dev/null +++ b/packages/cmk-crypto/BUILD @@ -0,0 +1,21 @@ +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/crypto/__init__.py", + "cmk/crypto/certificate.py", + "cmk/crypto/deprecated.py", + "cmk/crypto/hash.py", + "cmk/crypto/keys.py", + "cmk/crypto/password.py", + "cmk/crypto/password_hashing.py", + "cmk/crypto/pem.py", + "cmk/crypto/secrets.py", + "cmk/crypto/symmetric.py", + "cmk/crypto/totp.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/cmk-graphing/BUILD b/packages/cmk-graphing/BUILD new file mode 100644 index 00000000000..7e2fe5d9a7b --- /dev/null +++ b/packages/cmk-graphing/BUILD @@ -0,0 +1,18 @@ +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/graphing/__init__.py", + "cmk/graphing/v1/__init__.py", + "cmk/graphing/v1/_localize.py", + "cmk/graphing/v1/_type_defs.py", + "cmk/graphing/v1/graphs.py", + "cmk/graphing/v1/metrics.py", + "cmk/graphing/v1/perfometers.py", + "cmk/graphing/v1/translations.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/cmk-livestatus-client/BUILD b/packages/cmk-livestatus-client/BUILD new file mode 100644 index 00000000000..96f1eadef0c --- /dev/null +++ b/packages/cmk-livestatus-client/BUILD @@ -0,0 +1,12 @@ +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/livestatus_client/__init__.py", + "livestatus/__init__.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/cmk-messaging/BUILD b/packages/cmk-messaging/BUILD new file mode 100644 index 00000000000..bc616f47ac8 --- /dev/null +++ b/packages/cmk-messaging/BUILD @@ -0,0 +1,15 @@ +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/messaging/__init__.py", + "cmk/messaging/_config.py", + "cmk/messaging/_connection.py", + "cmk/messaging/_constants.py", + "cmk/messaging/rabbitmq.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/cmk-mkp-tool/BUILD b/packages/cmk-mkp-tool/BUILD new file mode 100644 index 00000000000..203f514382b --- /dev/null +++ b/packages/cmk-mkp-tool/BUILD @@ -0,0 +1,21 @@ +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/mkp_tool/__init__.py", + "cmk/mkp_tool/__main__.py", + "cmk/mkp_tool/__version__.py", + "cmk/mkp_tool/_installed.py", + "cmk/mkp_tool/_mkp.py", + "cmk/mkp_tool/_parts.py", + "cmk/mkp_tool/_reporter.py", + "cmk/mkp_tool/_standalone.py", + "cmk/mkp_tool/_type_defs.py", + "cmk/mkp_tool/_unsorted.py", + "cmk/mkp_tool/cli.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/cmk-rulesets/BUILD b/packages/cmk-rulesets/BUILD new file mode 100644 index 00000000000..a878b8a74ce --- /dev/null +++ b/packages/cmk-rulesets/BUILD @@ -0,0 +1,22 @@ +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/rulesets/__init__.py", + "cmk/rulesets/v1/__init__.py", + "cmk/rulesets/v1/_localize.py", + "cmk/rulesets/v1/form_specs/__init__.py", + "cmk/rulesets/v1/form_specs/_base.py", + "cmk/rulesets/v1/form_specs/_basic.py", + "cmk/rulesets/v1/form_specs/_composed.py", + "cmk/rulesets/v1/form_specs/_levels.py", + "cmk/rulesets/v1/form_specs/_migrations.py", + "cmk/rulesets/v1/form_specs/_preconfigured.py", + "cmk/rulesets/v1/form_specs/validators.py", + "cmk/rulesets/v1/rule_specs.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/cmk-server-side-calls/BUILD b/packages/cmk-server-side-calls/BUILD new file mode 100644 index 00000000000..fbed9890c69 --- /dev/null +++ b/packages/cmk-server-side-calls/BUILD @@ -0,0 +1,15 @@ +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/server_side_calls/__init__.py", + "cmk/server_side_calls/v1/__init__.py", + "cmk/server_side_calls/v1/_active_checks.py", + "cmk/server_side_calls/v1/_special_agents.py", + "cmk/server_side_calls/v1/_utils.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/cmk-werks/BUILD b/packages/cmk-werks/BUILD index 985883be7f8..5a08d40d26d 100644 --- a/packages/cmk-werks/BUILD +++ b/packages/cmk-werks/BUILD @@ -2,6 +2,28 @@ load("@rules_python//python:pip.bzl", "compile_pip_requirements") load("@aspect_rules_py//py:defs.bzl", "py_library", "py_pytest_main", "py_test") load("@cmk_werks//:requirements.bzl", "requirement") +filegroup( + name = "files", + srcs = [ + "Pipfile", + "Pipfile.lock", + "cmk/werks/__init__.py", + "cmk/werks/cli.py", + "cmk/werks/config.py", + "cmk/werks/convert.py", + "cmk/werks/error.py", + "cmk/werks/format.py", + "cmk/werks/load.py", + "cmk/werks/markup.py", + "cmk/werks/models.py", + "cmk/werks/parse.py", + "cmk/werks/validate.py", + "pyproject.toml", + "setup.cfg", + ], + visibility = ["//visibility:public"], +) + compile_pip_requirements( name = "requirements", requirements_in = "pyproject.toml",