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 Sep 20, 2024
1 parent a126809 commit aeab122
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 0 deletions.
11 changes: 11 additions & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ load("@nvidia_ubuntu2404_cuda//:packages.bzl", "nvidia_ubuntu2404_cuda_packages"

nvidia_ubuntu2404_cuda_packages()

# bazel run @bullseye_all//:lock
deb_index(
name = "bullseye_all",
lock = "//examples/debian_snapshot_all_arch:bullseye_all.lock.json",
manifest = "//examples/debian_snapshot_all_arch:bullseye_all.yaml",
)

load("@bullseye_all//:packages.bzl", "bullseye_all_packages")

bullseye_all_packages()

deb_index(
name = "apt_security",
manifest = "//examples/debian_snapshot_security:security.yaml",
Expand Down
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 aeab122

Please sign in to comment.