2023-09-11 09:54:08 -04:00
|
|
|
load("//bazel/mkosi:mkosi_image.bzl", "mkosi_image")
|
2024-01-04 11:02:13 -05:00
|
|
|
load("//bazel/osimage:upload_os_images.bzl", "upload_os_images")
|
2024-01-15 12:04:29 -05:00
|
|
|
load(":variants.bzl", "CSPS", "STREAMS", "VARIANTS", "autologin", "base_image", "constellation_packages", "images_for_csp", "images_for_csp_and_stream", "images_for_stream", "kernel_command_line", "kernel_command_line_dict")
|
2023-09-11 09:54:08 -04:00
|
|
|
|
|
|
|
[
|
|
|
|
mkosi_image(
|
|
|
|
name = variant["csp"] + "_" + variant["attestation_variant"] + "_" + stream,
|
|
|
|
srcs = [
|
|
|
|
"mkosi.postinst",
|
|
|
|
] + glob([
|
|
|
|
"mkosi.repart/**",
|
|
|
|
]),
|
|
|
|
autologin = autologin(
|
|
|
|
variant["csp"],
|
|
|
|
variant["attestation_variant"],
|
|
|
|
stream,
|
|
|
|
),
|
|
|
|
base_trees = [
|
2024-01-15 12:04:29 -05:00
|
|
|
base_image(
|
|
|
|
variant["csp"],
|
|
|
|
variant["attestation_variant"],
|
|
|
|
stream,
|
|
|
|
),
|
2023-09-11 09:54:08 -04:00
|
|
|
],
|
|
|
|
extra_trees = constellation_packages(stream),
|
|
|
|
initrds = [
|
|
|
|
"//image/initrd",
|
|
|
|
],
|
|
|
|
kernel_command_line = kernel_command_line(
|
|
|
|
variant["csp"],
|
|
|
|
variant["attestation_variant"],
|
|
|
|
stream,
|
|
|
|
),
|
|
|
|
kernel_command_line_dict = kernel_command_line_dict(
|
|
|
|
variant["csp"],
|
|
|
|
variant["attestation_variant"],
|
|
|
|
stream,
|
|
|
|
),
|
|
|
|
mkosi_conf = "mkosi.conf",
|
|
|
|
out_dir = variant["csp"] + "_" + variant["attestation_variant"] + "_" + stream,
|
|
|
|
tags = [
|
|
|
|
"manual",
|
|
|
|
"no-cache",
|
|
|
|
],
|
|
|
|
version_file = "//bazel/settings:tag",
|
2024-01-04 11:02:13 -05:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
for variant in VARIANTS
|
|
|
|
for stream in STREAMS
|
|
|
|
]
|
|
|
|
|
|
|
|
[
|
|
|
|
upload_os_images(
|
|
|
|
name = "upload_" + variant["csp"] + "_" + variant["attestation_variant"] + "_" + stream,
|
|
|
|
image_dirs = [":" + variant["csp"] + "_" + variant["attestation_variant"] + "_" + stream],
|
2024-01-15 09:24:45 -05:00
|
|
|
tags = [
|
|
|
|
"manual",
|
|
|
|
],
|
2023-09-11 09:54:08 -04:00
|
|
|
)
|
|
|
|
for variant in VARIANTS
|
|
|
|
for stream in STREAMS
|
|
|
|
]
|
|
|
|
|
|
|
|
[
|
|
|
|
filegroup(
|
|
|
|
name = stream,
|
|
|
|
srcs = images_for_stream(stream),
|
|
|
|
tags = [
|
|
|
|
"manual",
|
|
|
|
"no-cache",
|
|
|
|
],
|
2024-01-04 11:02:13 -05:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
for stream in STREAMS
|
|
|
|
]
|
|
|
|
|
|
|
|
[
|
|
|
|
upload_os_images(
|
|
|
|
name = "upload_" + stream,
|
|
|
|
image_dirs = [":" + stream],
|
2024-01-15 09:24:45 -05:00
|
|
|
tags = [
|
|
|
|
"manual",
|
|
|
|
],
|
2023-09-11 09:54:08 -04:00
|
|
|
)
|
|
|
|
for stream in STREAMS
|
|
|
|
]
|
|
|
|
|
|
|
|
[
|
|
|
|
filegroup(
|
|
|
|
name = csp,
|
|
|
|
srcs = images_for_csp(csp),
|
|
|
|
tags = [
|
|
|
|
"manual",
|
|
|
|
"no-cache",
|
|
|
|
],
|
2024-01-04 11:02:13 -05:00
|
|
|
visibility = ["//visibility:public"],
|
2023-09-11 09:54:08 -04:00
|
|
|
)
|
|
|
|
for csp in CSPS
|
|
|
|
]
|
|
|
|
|
|
|
|
[
|
|
|
|
filegroup(
|
|
|
|
name = csp + "_" + stream,
|
|
|
|
srcs = images_for_csp_and_stream(csp, stream),
|
|
|
|
tags = [
|
|
|
|
"manual",
|
|
|
|
"no-cache",
|
|
|
|
],
|
2024-01-04 11:02:13 -05:00
|
|
|
visibility = ["//visibility:public"],
|
2023-09-11 09:54:08 -04:00
|
|
|
)
|
|
|
|
for csp in CSPS
|
|
|
|
for stream in STREAMS
|
|
|
|
]
|