-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathpipeline.yml
More file actions
225 lines (197 loc) Β· 7.16 KB
/
Copy pathpipeline.yml
File metadata and controls
225 lines (197 loc) Β· 7.16 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
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
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---
# Nodes with values to reuse in the pipeline.
common_params:
- &test_collector_common_params
files: "buildkite-test-analytics/*.xml"
format: "junit"
agents:
queue: "android"
steps:
#################
# Gradle Wrapper Validation
#################
- label: Gradle Wrapper Validation
command: validate_gradle_wrapper
agents:
queue: linter
# Wait for Gradle Wrapper to be validated before running any other jobs
- wait
#################
# [DO NOT MERGE] Signing config validation, removed with this branch
#################
- label: "π Validate signing config"
command: .buildkite/commands/validate-signing-config.sh
plugins: [$CI_TOOLKIT]
artifact_paths:
- "build/signing-validation/*.txt"
#################
# Linters
#################
- group: "π΅οΈββοΈ Linters"
steps:
- label: ":danger: Danger - PR Check"
command: danger
key: danger
if: "build.pull_request.id != null"
retry:
manual:
permit_on_passed: true
agents:
queue: "linter"
- label: "π΅οΈ checkstyle"
command: |
if .buildkite/commands/should-skip-job.sh --job-type validation; then
exit 0
fi
./gradlew checkstyle
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/checkstyle/checkstyle.*"
- label: "π΅οΈ detekt"
command: |
if .buildkite/commands/should-skip-job.sh --job-type validation; then
exit 0
fi
./gradlew detekt
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/detekt/detekt.html"
- label: "π Locale Consistency"
command: |
if .buildkite/commands/should-skip-job.sh --job-type validation; then
exit 0
fi
install_gems
bundle exec fastlane check_declared_locales_consistency app:wordpress
bundle exec fastlane check_declared_locales_consistency app:jetpack
plugins: [$CI_TOOLKIT]
- label: "π΅οΈ Lint WordPress"
command: ".buildkite/commands/lint.sh wordpress"
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"
notify:
- slack:
channels:
- "#wpmobile-team"
message: "β οΈ Lint WordPress failed on trunk."
if: build.pull_request.id == null && step.outcome != "passed"
- label: "π΅οΈ Lint Jetpack"
command: ".buildkite/commands/lint.sh jetpack"
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"
notify:
- slack:
channels:
- "#wpmobile-team"
message: "β οΈ Lint Jetpack failed on trunk."
if: build.pull_request.id == null && step.outcome != "passed"
- label: "π΅οΈ Lint Libraries"
command: ".buildkite/commands/lint.sh library"
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"
notify:
- slack:
channels:
- "#wpmobile-team"
message: "β οΈ Lint Libraries failed on trunk."
if: build.pull_request.id == null && step.outcome != "passed"
#################
# Diff Reports
#################
- group: "π΅οΈββοΈ Diff Reports"
steps:
- label: "Dependency Tree Diff"
command: |
comment_with_dependency_diff 'WordPress' 'wordpressReleaseRuntimeClasspath'
if: build.pull_request.id != null
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/diff/*"
# TODO: Remove soft_fail after this PR merges and trunk
# uses the new variant names (without buildType flavors)
soft_fail: true
- label: "Merged Manifest Diff WordPress"
command: ".buildkite/commands/diff-merged-manifest.sh wordpressRelease"
if: build.pull_request.id != null
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/diff_manifest/**/**/*"
soft_fail: true
- label: "Merged Manifest Diff Jetpack"
command: ".buildkite/commands/diff-merged-manifest.sh jetpackRelease"
if: build.pull_request.id != null
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/diff_manifest/**/**/*"
soft_fail: true
#################
# Unit Tests
#################
- label: "π¬ Unit Tests"
key: unit-tests
command: ".buildkite/commands/run-unit-tests.sh"
plugins:
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_WORDPRESS"
artifact_paths:
- "**/build/test-results/merged-test-results.xml"
- "**/build/reports/kover/*.xml"
#################
# Instrumented (aka UI) Tests
#################
# - group: "π¬ Instrumented tests"
# steps:
# - label: ":wordpress: π¬ Instrumented tests"
# command: ".buildkite/commands/run-instrumented-tests.sh wordpress"
# plugins:
# - $CI_TOOLKIT
# - $TEST_COLLECTOR :
# <<: *test_collector_common_params
# api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_INSTRUMENTED_TESTS_WORDPRESS"
# artifact_paths:
# - "**/build/instrumented-tests/**/*"
# - label: ":jetpack: π¬ Instrumented tests"
# command: ".buildkite/commands/run-instrumented-tests.sh jetpack"
# plugins:
# - $CI_TOOLKIT
# - $TEST_COLLECTOR :
# <<: *test_collector_common_params
# api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_INSTRUMENTED_TESTS_JETPACK"
# artifact_paths:
# - "**/build/instrumented-tests/**/*"
#################
# Create Prototype Builds for WP and JP
#################
- group: "π² Prototype Builds"
steps:
- label: ":wordpress: :android: Prototype Build"
command: ".buildkite/commands/prototype-build.sh wordpress"
if: build.pull_request.id != null
plugins: [$CI_TOOLKIT]
- label: ":jetpack: :android: Prototype Build"
command: ".buildkite/commands/prototype-build.sh jetpack"
if: build.pull_request.id != null
plugins: [$CI_TOOLKIT ]
- group: "π Gradle build cache"
steps:
- label: ":wordpress: Populate Gradle build cache"
command: ".buildkite/commands/gradle-cache-build.sh wordpress"
plugins: [ $CI_TOOLKIT ]
- label: ":jetpack: Populate Gradle build cache"
command: ".buildkite/commands/gradle-cache-build.sh jetpack"
plugins: [ $CI_TOOLKIT ]
#################
# Claude Build Analysis - dynamically uploaded so Build result conditions evaluate at runtime after the wait
#################
- wait: ~
continue_on_failure: true
- label: ":claude: π΅οΈ Check for Build Failures and Run Claude Analysis"
command: .buildkite/commands/upload-claude-analysis.sh
agents:
queue: upload