...
1load("@container_structure_test//:defs.bzl", "container_structure_test")
2load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")
3load("@rules_pkg//:pkg.bzl", "pkg_tar")
4load("@rules_python//python:defs.bzl", "py_library")
5load("//hack/build/rules/container:index.bzl", "container_push")
6
7pkg_tar(
8 name = "files",
9 extension = "tgz",
10 files = {
11 ":init-script.sh": "init-script.sh",
12 ":mount-monitor.py": "mount-monitor.py",
13 },
14 mode = "755",
15 package_dir = "/samhain/config",
16 tags = [
17 "manual",
18 "no-remote-cache",
19 ],
20)
21
22oci_image(
23 name = "samhain-base",
24 base = "@samhain",
25 tars = [":files"],
26)
27
28oci_load(
29 name = "samhain-base-load",
30 image = ":samhain-base",
31 repo_tags = ["samhain-base-tar:latest"],
32 tags = ["manual"],
33)
34
35filegroup(
36 name = "samhain-base.tar",
37 srcs = [":samhain-base-load"],
38 output_group = "tarball",
39)
40
41container_structure_test(
42 name = "samhain-base-test",
43 configs = [":test.yaml"],
44 driver = "tar",
45 image = ":samhain-base.tar",
46)
47
48container_push(
49 image = ":samhain-base",
50 image_name = "samhain-base",
51 repository_file = "//hack/build/rules/container:workloads-repo",
52 tags = [
53 "manual",
54 "no-remote-cache",
55 ],
56)
57
58py_library(
59 name = "fim",
60 srcs = ["mount-monitor.py"],
61 visibility = ["//:__subpackages__"],
62)
View as plain text