mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-22 14:04:53 -04:00
bazel: convert all container images to Bazel
This commit is contained in:
parent
1f81763a27
commit
bd889bd6a7
5 changed files with 155 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
|||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
|
||||
load("@rules_oci//oci:defs.bzl", "oci_image")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
|
||||
# gazelle:prefix github.com/edgelesssys/constellation/v2/operators/constellation-node-operator/v2
|
||||
|
||||
|
@ -36,3 +38,31 @@ go_binary(
|
|||
pure = "on",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
go_cross_binary(
|
||||
name = "node_operator_amd64",
|
||||
platform = "@io_bazel_rules_go//go/toolchain:linux_amd64",
|
||||
target = ":constellation-node-operator",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_tar(
|
||||
name = "layer",
|
||||
srcs = [
|
||||
":node_operator_amd64",
|
||||
],
|
||||
mode = "0755",
|
||||
remap_paths = {"/node_operator_amd64": "/node-operator"},
|
||||
)
|
||||
|
||||
oci_image(
|
||||
name = "node_operator",
|
||||
architecture = "amd64",
|
||||
base = "@distroless_static",
|
||||
entrypoint = ["/node-operator"],
|
||||
os = "linux",
|
||||
tars = [
|
||||
":layer",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue