forked from GoogleContainerTools/kaniko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
109 lines (100 loc) · 2.49 KB
/
BUILD
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
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "integration",
srcs = [
"cleanup.go",
"cmd.go",
"config.go",
"gcs.go",
"images.go",
],
importpath = "github.com/GoogleContainerTools/kaniko/integration",
tags = ["manual"],
visibility = ["//visibility:public"],
deps = ["//pkg/timing"],
)
go_test(
name = "integration_test",
srcs = [
"benchmark_test.go",
"integration_test.go",
"integration_with_context_test.go",
"integration_with_stdin_test.go",
"k8s_test.go",
],
data = glob(["testdata/**"]),
embed = [":integration"],
tags = ["manual"],
deps = [
"//pkg/timing",
"//pkg/util",
"//testutil",
"//vendor/github.com/google/go-containerregistry/pkg/name",
"//vendor/github.com/google/go-containerregistry/pkg/v1/daemon",
"//vendor/github.com/pkg/errors",
],
)
load("@io_bazel_rules_docker//container:container.bzl", "container_image")
load("@io_bazel_rules_docker//contrib:test.bzl", "container_test")
ARCHITECTURES = [
"amd64",
"arm64",
]
# Image with testdata
[
container_image(
name = "buildtest_image_" + arch,
architecture = arch,
base = "//cmd/executor:image_" + arch,
directory = "/workspace",
files = [
":testdata/Dockerfile.trivial",
],
)
for arch in ARCHITECTURES
]
# Non-executable tests can run on any architecture,
# so do not tag them.
[
container_test(
name = "image_files_" + arch + "_test",
configs = ["testdata/files.yaml"],
image = "//cmd/executor:image_" + arch,
)
for arch in ARCHITECTURES
]
[
container_test(
name = "buildtest_image_" + arch + "_test",
configs = [
"testdata/files.yaml",
"testdata/testfiles.yaml",
],
image = ":buildtest_image_" + arch,
)
for arch in ARCHITECTURES
]
[
container_test(
name = "image_exec_" + arch + "_test",
configs = ["testdata/exec.yaml"],
image = "//cmd/executor:image_" + arch,
tags = [
"manual",
arch,
],
)
for arch in ARCHITECTURES
]
[
container_test(
name = "image_build_" + arch + "_test",
configs = ["testdata/build.yaml"],
image = ":buildtest_image_" + arch,
tags = [
"manual",
arch,
],
)
for arch in ARCHITECTURES
]