-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBUILD.bazel
More file actions
92 lines (82 loc) · 1.88 KB
/
BUILD.bazel
File metadata and controls
92 lines (82 loc) · 1.88 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
load("@bazel_gazelle//:def.bzl", "gazelle")
# gazelle:prefix github.com/sufield/ephemos
gazelle(name = "gazelle")
# Keep generated BUILD files up to date with gazelle update
gazelle(
name = "gazelle-update-repos",
args = [
"-from_file=go.mod",
"-to_macro=deps.bzl%go_dependencies",
"-prune",
],
command = "update-repos",
)
# Format all BUILD files
gazelle(
name = "gazelle-fix",
command = "fix",
)
# Test everything
test_suite(
name = "all_tests",
tests = [
"//pkg/ephemos:ephemos_test",
"//scripts:build_tests",
"//scripts/ci:ci_tests",
"//scripts/demo:demo_tests",
"//scripts/security:security_tests",
"//scripts/utils:utils_tests",
],
)
# Build all binaries
filegroup(
name = "all_binaries",
srcs = [
"//cmd/config-validator",
"//cmd/ephemos-cli",
],
)
# Build and CI script targets
filegroup(
name = "build_scripts",
srcs = [
"//scripts:benchmark",
"//scripts:check_deps",
"//scripts:generate_proto",
"//scripts:lint",
],
)
# Security script targets
filegroup(
name = "security_scripts",
srcs = [
"//scripts/security:generate_sbom",
"//scripts/security:scan_secrets",
"//scripts/security:scan_vulnerabilities",
"//scripts/security:security_scan_all",
"//scripts/security:validate_sbom",
],
)
# Demo script targets
filegroup(
name = "demo_scripts",
srcs = [
"//scripts/demo:cleanup",
"//scripts/demo:full_demo",
"//scripts/demo:run_demo",
"//scripts/demo:setup_demo",
],
)
# Security analysis
sh_test(
name = "security_scan",
srcs = ["//tools:security_scan.sh"],
data = [":all_binaries"],
tags = ["security"],
)
# Lint check
sh_test(
name = "lint_check",
srcs = ["//tools:lint_check.sh"],
tags = ["lint"],
)