-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathBUILD
More file actions
82 lines (73 loc) · 1.73 KB
/
BUILD
File metadata and controls
82 lines (73 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Public notice: this file is for internal documentation, testing, and
# reference only. Note that repo maintainers can freely change any part of the
# repository code at any time.
load("@container_structure_test//:defs.bzl", "container_structure_test")
load("@rules_oci//oci:defs.bzl", "oci_image")
load("//private/util:tar.bzl", "tar")
package(default_visibility = ["//visibility:public"])
ARCHITECTURES = [
"amd64",
"arm64",
]
DISTROS = [
"debian13",
]
# These examples are adapted from:
# https://howtonode.org/hello-node
tar(
name = "hello_tar",
srcs = [
"hello.js",
],
)
tar(
name = "hello_http_tar",
srcs = [
"hello_http.js",
],
)
[
oci_image(
name = "hello_" + user + "_" + arch + "_" + distro,
base = "//nodejs:nodejs22_" + user + "_" + arch + "_" + distro,
cmd = ["hello.js"],
tars = [":hello_tar"],
)
for user in [
"root",
"nonroot",
]
for arch in ARCHITECTURES
for distro in DISTROS
]
[
oci_image(
name = "hello_http_" + user + "_" + arch + "_" + distro,
base = "//nodejs:nodejs22_" + user + "_" + arch + "_" + distro,
cmd = ["hello_http.js"],
tars = [":hello_http_tar"],
)
for user in [
"root",
"nonroot",
]
for arch in ARCHITECTURES
for distro in DISTROS
]
[
container_structure_test(
name = "hello_" + user + "_" + arch + "_" + distro + "_test",
configs = ["testdata/hello.yaml"],
image = ":hello_" + user + "_" + arch + "_" + distro,
tags = [
arch,
"manual",
],
)
for user in [
"root",
"nonroot",
]
for arch in ARCHITECTURES
for distro in DISTROS
]