diff --git a/MODULE.bazel b/MODULE.bazel index a2cb5ad08ed52634bb0e65a669748873ce5e0579..9d9576b9a82adc781521d76e556c11ad57c1c112 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -296,3 +296,19 @@ download_archive = use_repo_rule("@download_utils//download/archive:defs.bzl", " ("arm64", "zlib1g", "1.2.13.dfsg-1", "z", "zlib", "sha256-Uri4oUW74ZVruoIDT3cCLL7ww9CIXJ4y2YF6eTL+GRM="), ) ] + +# Download QEMU debian cloud images +download_file = use_repo_rule("@download_utils//download/file:defs.bzl", "download_file") +[ + download_file( + name = "{}-debian.12-gnu-qemu".format(cpu), + output = "image.qcow2", + executable = False, + urls = ["https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-{}.qcow2".format(cpu)], + integrity = integrity + ) + for cpu, integrity in ( + ("amd64", "sha256-p9rCK1tT7V/uDBI70LR3UoT8vK1aaJ9rWpL0jgXp+1I="), + ("arm64", "sha256-gxjqgasbjKLrLUtVJYz/MTiPbttisBz3Y4HglSRRspo="), + ) +] \ No newline at end of file diff --git a/e2e/MODULE.bazel b/e2e/MODULE.bazel index a90786bb6ee465be80b2ec2796719c3985136413..73bb474f750b6a537d3095c7bf74d889ad540917 100644 --- a/e2e/MODULE.bazel +++ b/e2e/MODULE.bazel @@ -43,4 +43,4 @@ pip.parse( python_version = "3.11", requirements_lock = "//python:requirements.txt", ) -use_repo(pip, "pip") +use_repo(pip, "pip") \ No newline at end of file diff --git a/qemu/debian/BUILD.bazel b/qemu/debian/BUILD.bazel new file mode 100644 index 0000000000000000000000000000000000000000..eec1fb2e6aba9ae32d350ff98cb8ac7cc606baa9 --- /dev/null +++ b/qemu/debian/BUILD.bazel @@ -0,0 +1,15 @@ +load("@bazel_skylib//rules:build_test.bzl", "build_test") + + +alias( + name = "image", + actual = select({ + "@platforms//cpu:aarch64": "@arm64-debian.12-gnu-qemu//:image.qcow2", + "@platforms//cpu:x86_64": "@amd64-debian.12-gnu-qemu//:image.qcow2", + }, no_match_error = "No QEMU Debian image for platform.") +) + +build_test( + name = "download", + targets = [":image"], +) \ No newline at end of file