Skip to content

Commit

Permalink
test: example with "all" arch only
Browse files Browse the repository at this point in the history
  • Loading branch information
jjmaestro committed Nov 26, 2024
1 parent 4878143 commit c76ea8b
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ apt.install(
lock = "//examples/debian_flat_repo:bullseye_rproject.lock.json",
manifest = "//examples/debian_flat_repo:bullseye_rproject.yaml",
)
apt.install(
name = "bullseye_all",
lock = "//examples/debian_snapshot_all_arch:bullseye_all.lock.json",
manifest = "//examples/debian_snapshot_all_arch:bullseye_all.yaml",
)
apt.install(
name = "apt_security",
manifest = "//examples/debian_snapshot_security:security.yaml",
Expand All @@ -95,4 +100,4 @@ apt.install(
lock = "//examples/debian_flat_repo:nvidia_ubuntu2404_cuda.lock.json",
manifest = "//examples/debian_flat_repo:nvidia_ubuntu2404_cuda.yaml",
)
use_repo(apt, "apt_security", "apt_security_resolve", "bullseye", "bullseye_nolock", "bullseye_rproject", "noble", "nvidia_ubuntu2404_cuda", "shared_dependencies")
use_repo(apt, "apt_security", "apt_security_resolve", "bullseye", "bullseye_all", "bullseye_all_resolve", "bullseye_nolock", "bullseye_rproject", "noble", "nvidia_ubuntu2404_cuda", "shared_dependencies")
32 changes: 32 additions & 0 deletions examples/debian_snapshot_all_arch/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
load("@aspect_bazel_lib//lib:jq.bzl", "jq")
load("@aspect_bazel_lib//lib:testing.bzl", "assert_contains")

jq(
name = "pick_quake_arch",
srcs = [
"@bullseye_all_resolve//:lockfile",
],
args = ["-rj"],
filter = ".packages.quake[] | .arch",
)

assert_contains(
name = "test_quake_arch",
actual = ":pick_quake_arch",
expected = "all",
)

jq(
name = "pick_quake_version",
srcs = [
"@bullseye_all_resolve//:lockfile",
],
args = ["-rj"],
filter = ".packages.quake[] | .version",
)

assert_contains(
name = "test_quake_version",
actual = ":pick_quake_version",
expected = "67",
)
30 changes: 30 additions & 0 deletions examples/debian_snapshot_all_arch/bullseye_all.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"packages": {
"game-data-packager-runtime": {
"all": {
"arch": "all",
"dependencies": [],
"name": "game-data-packager-runtime",
"sha256": "eee39c4ef95519191f8a3c2582661a4ba812962203046cfe5f97af00d73045ed",
"url": "https://snapshot-cloudflare.debian.org/archive/debian/20240210T223313Z/pool/contrib/g/game-data-packager/game-data-packager-runtime_67_all.deb",
"version": "67"
}
},
"quake": {
"all": {
"arch": "all",
"dependencies": [
{
"name": "game-data-packager-runtime",
"version": "67"
}
],
"name": "quake",
"sha256": "54298c07795d65cf216262980a8be700f2859aa6be16c7441b688e7d7a627af6",
"url": "https://snapshot-cloudflare.debian.org/archive/debian/20240210T223313Z/pool/contrib/g/game-data-packager/quake_67_all.deb",
"version": "67"
}
}
},
"version": 2
}
20 changes: 20 additions & 0 deletions examples/debian_snapshot_all_arch/bullseye_all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Packages for examples/debian_snapshot_all_arch.
#
# Anytime this file is changed, the lockfile needs to be regenerated.
#
# To generate the bullseye_all.lock.json run the following command
#
# bazel run @bullseye_all//:lock
#
# See debian_package_index at WORKSPACE.bazel
version: 1

sources:
- channel: bullseye contrib
url: https://snapshot-cloudflare.debian.org/archive/debian/20240210T223313Z

archs:
- all

packages:
- quake

0 comments on commit c76ea8b

Please sign in to comment.