forked from bazel-contrib/rules_img
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.bazel
More file actions
168 lines (158 loc) · 6.83 KB
/
Copy pathBUILD.bazel
File metadata and controls
168 lines (158 loc) · 6.83 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
load("@bazel_binaries//:defs.bzl", "bazel_binaries")
load(
"@rules_bazel_integration_test//bazel_integration_test:defs.bzl",
"bazel_integration_tests",
"integration_test_utils",
)
# gazelle:exclude cc
# gazelle:exclude go
# gazelle:exclude generic
# gazelle:exclude js
# gazelle:exclude python
# gazelle:exclude sbom
# gazelle:exclude workspace
# gazelle:exclude_from_release
TAGS = integration_test_utils.DEFAULT_INTEGRATION_TEST_TAGS + ["requires-network"]
bazel_integration_tests(
name = "go",
bazel_versions = bazel_binaries.versions.all,
tags = TAGS,
test_runner = "//img/private/integration_test_runner",
workspace_files = integration_test_utils.glob_workspace_files("go") + [
"//img/private/release/source_files:release_src_files",
],
workspace_path = "go",
)
bazel_integration_tests(
name = "cc",
bazel_versions = bazel_binaries.versions.all,
tags = TAGS,
target_compatible_with = ["@platforms//os:linux"],
test_runner = "//img/private/integration_test_runner",
workspace_files = integration_test_utils.glob_workspace_files("cc") + [
"//img/private/release/source_files:release_src_files",
],
workspace_path = "cc",
)
bazel_integration_tests(
name = "generic",
bazel_versions = bazel_binaries.versions.all,
tags = TAGS,
test_runner = "//img/private/integration_test_runner",
workspace_files = integration_test_utils.glob_workspace_files("generic") + [
"//img/private/release/source_files:release_src_files",
],
workspace_path = "generic",
)
bazel_integration_tests(
name = "js",
bazel_versions = [
"8.7.0",
"9.0.2",
],
tags = TAGS,
target_compatible_with = select({
# skip windows due to this issue in aspect_rules_js:
# ERROR: D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/bin/e2e/js_bazel_7_4_0.exe.runfiles/_main/e2e/js.scratch/app/BUILD.bazel:14:15: Computing Layer Groups //app:layers failed: (Exit 1): node.exe failed: error executing JsImageLayerGroups command (from target //app:layers) external\rules_nodejs~~node~nodejs_windows_amd64\bin\nodejs\node.exe bazel-out/x64_windows-fastbuild/bin/app/layers_js_image_layer_splitter.mjs
# node:internal/process/esm_loader:40
# internalBinding('errors').triggerUncaughtException(
# ^
#
# [Error: UNKNOWN: unknown error, readlink 'C:\users\runneradmin\appdata\local\temp\bit-578081517\l77zjc4j\execroot\_main\bazel-out\x64_windows-fastbuild-ST-576ef9824eaa\bin\node_modules\.aspect_rules_js\meaning-of-life@1.0.0\node_modules\meaning-of-life\index.js'] {
# errno: -4094,
# code: 'UNKNOWN',
# syscall: 'readlink',
# path: 'C:\\users\\runneradmin\\appdata\\local\\temp\\bit-578081517\\l77zjc4j\\execroot\\_main\\bazel-out\\x64_windows-fastbuild-ST-576ef9824eaa\\bin\\node_modules\\.aspect_rules_js\\meaning-of-life@1.0.0\\node_modules\\meaning-of-life\\index.js'
# }
"@platforms//os:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
test_runner = "//img/private/integration_test_runner",
workspace_files = integration_test_utils.glob_workspace_files("js") + [
"//img/private/release/source_files:release_src_files",
],
workspace_path = "js",
)
bazel_integration_tests(
name = "python",
bazel_versions = [
"8.7.0",
"9.0.2",
],
tags = TAGS,
target_compatible_with = select({
# skip windows due to this issue in aspect_rules_py:
# ERROR: error loading package '@@aspect_rules_py~//py/tools/venv_bin': at C:/users/runneradmin/appdata/local/temp/bit-251164491/h6u2tfaj/external/aspect_rules_py~/tools/release/defs.bzl:5:6: Unable to find package for @@[unknown repo 'rules_rust' requested from @@aspect_rules_py~]//rust:defs.bzl: The repository '@@[unknown repo 'rules_rust' requested from @@aspect_rules_py~]' could not be resolved: No repository visible as '@rules_rust' from repository '@@aspect_rules_py~'.
# ERROR: C:/users/runneradmin/appdata/local/temp/bit-251164491/h6u2tfaj/external/aspect_rules_py~/py/private/toolchain/venv/BUILD.bazel:3:17: error loading package '@@aspect_rules_py~//py/tools/venv_bin': at C:/users/runneradmin/appdata/local/temp/bit-251164491/h6u2tfaj/external/aspect_rules_py~/tools/release/defs.bzl:5:6: Unable to find package for @@[unknown repo 'rules_rust' requested from @@aspect_rules_py~]//rust:defs.bzl: The repository '@@[unknown repo 'rules_rust' requested from @@aspect_rules_py~]' could not be resolved: No repository visible as '@rules_rust' from repository '@@aspect_rules_py~'. and referenced by '@@aspect_rules_py~//py/private/toolchain/venv:venv_toolchain_source'
"@platforms//os:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
test_runner = "//img/private/integration_test_runner",
workspace_files = integration_test_utils.glob_workspace_files("python") + [
"//img/private/release/source_files:release_src_files",
],
workspace_path = "python",
)
bazel_integration_tests(
name = "sbom",
# Supply chain security tooling is still WIP.
# It doesn't make sense to target older
# Bazel versions.
bazel_versions = ["9.0.2"],
tags = TAGS,
test_runner = "//img/private/integration_test_runner",
workspace_files = integration_test_utils.glob_workspace_files("sbom") + [
"//img/private/release/source_files:release_src_files",
],
workspace_path = "sbom",
)
bazel_integration_tests(
name = "workspace",
# bazel 9 drops WORKSPACE support.
bazel_versions = [
"7.4.0",
],
tags = TAGS,
test_runner = "//img/private/integration_test_runner",
workspace_files = integration_test_utils.glob_workspace_files("workspace") + [
"//img/private/release/source_files:release_src_files",
],
workspace_path = "workspace",
)
test_suite(
name = "integration_tests",
tags = TAGS,
tests = integration_test_utils.bazel_integration_test_names(
"go",
bazel_binaries.versions.all,
) + integration_test_utils.bazel_integration_test_names(
"cc",
bazel_binaries.versions.all,
) + integration_test_utils.bazel_integration_test_names(
"generic",
bazel_binaries.versions.all,
) + integration_test_utils.bazel_integration_test_names(
"js",
[
"8.7.0",
"9.0.2",
],
) + integration_test_utils.bazel_integration_test_names(
"python",
[
"8.7.0",
"9.0.2",
],
) + integration_test_utils.bazel_integration_test_names(
"sbom",
[
"9.0.2",
],
) + integration_test_utils.bazel_integration_test_names(
"workspace",
[
"7.4.0",
],
),
visibility = ["//:__subpackages__"],
)