This repository has been archived by the owner on Dec 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
pipeline.verify.yml
242 lines (217 loc) · 7.53 KB
/
pipeline.verify.yml
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
---
env:
PANTS_CONFIG_FILES: "['pants.toml', 'pants.ci.toml']"
BUILDKITE_PLUGIN_VAULT_ENV_SECRET_PREFIX: "secret/data/buildkite/env"
# TODO: Figure out a way for this to be sourced from our
# rust-toolchain file
RUST_VERSION: 1.65.0
steps:
- group: ":white_check_mark: Validation"
# Validations are basic sanity checks, mostly around ensuring
# various configuration files are in proper working order.
key: validation
steps:
- label: ":github: Validate CODEOWNERS"
command: ".buildkite/scripts/validate_codeowners.sh"
plugins:
- docker#v5.3.0:
image: "node"
entrypoint: "bash"
- label: ":codecov: Validate codecov.yml"
command: curl --proto "=https" --tlsv1.2 --fail-with-body --verbose --data-binary @codecov.yml https://codecov.io/validate
# codecov.io/validate went down on Nov 15 2022, so, temporarily allowing failures
soft_fail: true
- label: ":python: Ensure regenerated constraints.txt"
command:
- .buildkite/scripts/ensure_regenerated_constraints.sh
- label: ":pants: All files are covered by Pants"
command:
- "./pants tailor --check ::"
- group: ":lint-roller: Lints"
# Lints are various code quality checks; formatting, style guide
# enforcement, typechecking, etc.
key: lints
steps:
- label: ":pants: BUILD Linting"
command:
- make lint-build
- label: ":nomad: HCL Linting"
command:
- make lint-hcl
- label: ":large_blue_square::lint-roller: Protobuf Linting"
command:
- make lint-proto
- label: ":large_blue_square::face_with_symbols_on_mouth: Protobuf Breaking Changes"
soft_fail: true
command:
- make lint-proto-breaking
- label: ":python: Linting"
command:
- make lint-python
plugins:
- grapl-security/vault-login#v0.1.3
- grapl-security/vault-env#v0.2.0:
secrets:
- grapl/TOOLCHAIN_AUTH_TOKEN
- label: ":python: Typechecking"
command:
- make typecheck
plugins:
- grapl-security/vault-login#v0.1.3
- grapl-security/vault-env#v0.2.0:
secrets:
- grapl/TOOLCHAIN_AUTH_TOKEN
- label: ":rust::clippy: Linting"
command:
- make lint-rust-clippy
agents:
queue: "beefy"
- label: ":rust: Formatting"
command:
- rustup set profile default
- make lint-rust-rustfmt
plugins:
- docker#v5.3.0:
image: "rust:${RUST_VERSION}"
- label: ":bash: Linting"
command:
- make lint-shell
plugins:
- grapl-security/vault-login#v0.1.3
- grapl-security/vault-env#v0.2.0:
secrets:
- grapl/TOOLCHAIN_AUTH_TOKEN
- label: ":docker: Linting"
command:
- make lint-docker
plugins:
- grapl-security/vault-login#v0.1.3
- grapl-security/vault-env#v0.2.0:
secrets:
- grapl/TOOLCHAIN_AUTH_TOKEN
- label: ":typescript::yaml::markdown: Linting"
command:
- make lint-prettier
- group: ":lock_with_ink_pen: Dependency Audits"
# Audits are checks of dependencies: finding unused dependencies,
# finding dependencies with reported security vulnerabilities,
# etc.
key: audit
steps:
- label: ":thinking_face::rust: Cargo Audit?"
plugins:
- grapl-security/grapl-release#v0.1.2
- chronotc/monorepo-diff#v2.2.0:
diff: grapl_diff.sh
log_level: "debug"
watch:
- path:
- "**/Cargo.toml"
- "**/Cargo.lock"
config:
label: ":pipeline: Upload Cargo Audit"
group: ":lock_with_ink_pen: Dependency Audits"
command: ".buildkite/pipeline.cargo-audit.sh | buildkite-agent pipeline upload"
- label: ":thinking_face::nodejs: Yarn Audit?"
plugins:
- grapl-security/grapl-release#v0.1.2
- chronotc/monorepo-diff#v2.2.0:
diff: grapl_diff.sh
log_level: "debug"
watch:
- path:
- "**/package.json"
- "**/yarn.lock"
config:
label: ":pipeline: Upload Yarn Audit"
group: ":lock_with_ink_pen: Dependency Audits"
command: ".buildkite/pipeline.yarn-audit.sh | buildkite-agent pipeline upload"
- label: ":thinking_face::rust: Cargo Udeps?"
plugins:
- grapl-security/grapl-release#v0.1.2
- chronotc/monorepo-diff#v2.2.0:
diff: grapl_diff.sh
log_level: "debug"
watch:
- path:
- "**/Cargo.toml"
- "**/Cargo.lock"
config:
label: ":pipeline: Upload Cargo Udeps"
group: ":lock_with_ink_pen: Dependency Audits"
command: ".buildkite/pipeline.cargo-udeps.sh | buildkite-agent pipeline upload"
- group: "Unit Tests"
key: unit-tests
steps:
- label: ":python: Unit Tests"
command:
- make test-unit-python
plugins:
- grapl-security/vault-login#v0.1.3
- grapl-security/vault-env#v0.2.0:
secrets:
- grapl/TOOLCHAIN_AUTH_TOKEN
- grapl/CODECOV_TOKEN
- grapl-security/codecov#v0.1.6
- label: ":rust: Unit Tests"
command:
- make test-unit-rust-coverage
plugins:
- grapl-security/vault-login#v0.1.3
- grapl-security/vault-env#v0.2.0:
secrets:
- grapl/CODECOV_TOKEN
- grapl-security/codecov#v0.1.6
agents:
queue: "beefy"
# TODO: Consider beefy queue
- label: ":typescript: Unit Tests"
command:
- make test-unit-js
# plugins:
# - grapl-security/vault-login#v0.1.3
# - grapl-security/vault-env#v0.2.0:
# secrets:
# - grapl/CODECOV_TOKEN
# - grapl-security/codecov#v0.1.6
- group: "Integration tests"
key: integration-tests
steps:
- label: ":python: Python Integration Tests"
command:
- make test-integration-python
plugins:
- grapl-security/vault-login#v0.1.3
- grapl-security/vault-env#v0.2.0:
secrets:
- grapl/TOOLCHAIN_AUTH_TOKEN
env:
GRAPL_LOG_LEVEL: "DEBUG"
agents:
queue: "beefy"
artifact_paths:
- "test_artifacts/**/*"
# https://github.com/grapl-security/issue-tracker/issues/894
- "src/js/frontend/source_map_explorer_result.html"
- label: ":rust: Rust Integration Tests"
command:
- make test-integration-rust
plugins:
- grapl-security/vault-login#v0.1.3
- grapl-security/vault-env#v0.2.0:
secrets:
- grapl/TOOLCHAIN_AUTH_TOKEN
env:
GRAPL_LOG_LEVEL: "DEBUG"
agents:
queue: "beefy"
artifact_paths:
- "test_artifacts/**/*"
- label: "Build docs :book:"
command:
- make build-docs
- label: ":firecracker: Firecracker RootFS"
command:
- make dist/firecracker_rootfs.tar.gz
agents:
queue: "packer"