mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 00:19:36 -05:00
ac1128d07f
* Add common backend for interacting with cryptsetup * Use common cryptsetup backend in bootstrapper * Use common cryptsetup backend in disk-mapper * Use common cryptsetup backend in csi lib --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
51 lines
1.3 KiB
Python
51 lines
1.3 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|
load("//bazel/go:go_test.bzl", "go_ld_test", "go_test")
|
|
|
|
go_library(
|
|
name = "cryptmapper",
|
|
srcs = [
|
|
"cryptmapper.go",
|
|
"cryptmapper_cgo.go",
|
|
"cryptmapper_cross.go",
|
|
],
|
|
importpath = "github.com/edgelesssys/constellation/v2/csi/cryptmapper",
|
|
target_compatible_with = [
|
|
"@platforms//os:linux",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//internal/crypto",
|
|
"//internal/cryptsetup",
|
|
] + select({
|
|
"@io_bazel_rules_go//go/platform:android": [
|
|
"@com_github_martinjungblut_go_cryptsetup//:go-cryptsetup",
|
|
"@io_k8s_mount_utils//:mount-utils",
|
|
"@io_k8s_utils//exec",
|
|
],
|
|
"@io_bazel_rules_go//go/platform:linux": [
|
|
"@com_github_martinjungblut_go_cryptsetup//:go-cryptsetup",
|
|
"@io_k8s_mount_utils//:mount-utils",
|
|
"@io_k8s_utils//exec",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|
|
|
|
go_test(
|
|
name = "cryptmapper_test",
|
|
srcs = ["cryptmapper_test.go"],
|
|
embed = [":cryptmapper"],
|
|
# keep
|
|
tags = ["manual"],
|
|
deps = [
|
|
"@com_github_stretchr_testify//assert",
|
|
"@org_uber_go_goleak//:goleak",
|
|
],
|
|
)
|
|
|
|
go_ld_test(
|
|
name = "cryptmapper_ld_test",
|
|
src = "cryptmapper_test",
|
|
ld = "//rpm:ld",
|
|
)
|