Skip to content

Commit 0cf5aaf

Browse files
authored
Merge pull request #8534 from Pinata-Consulting/bazel-tweaks
jenkins: tweak bazel build
2 parents c154aab + 856f98b commit 0cf5aaf

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Jenkinsfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,18 @@ def bazelTest = {
223223
timeout(time: 120, unit: 'MINUTES') {
224224
def cmd = 'bazelisk test --config=ci --show_timestamps --test_output=errors --curses=no --force_pic --remote_header="Authorization=Basic $BAZEL_AUTH_TOKEN_B64" --profile=build.profile'
225225
try {
226-
sh label: 'Bazel Build', script: cmd + ' ...';
227-
sh label: 'Bazel Build', script: 'bazelisk analyze-profile build.profile';
226+
try {
227+
sh label: 'Test, using cached results and building a minimum of dependencies', script: cmd + ' ...';
228+
} finally {
229+
sh label: 'Analyze build times', script: 'bazelisk analyze-profile build.profile';
230+
}
228231
} catch (e) {
229232
currentBuild.result = 'FAILURE';
230-
sh label: 'Bazel Build (keep_going)', script: cmd + ' --keep_going ...';
233+
try {
234+
sh label: 'Test (keep_going)', script: cmd + ' --keep_going ...';
235+
} finally {
236+
sh label: 'Analyze build times', script: 'bazelisk analyze-profile build.profile';
237+
}
231238
}
232239
}
233240
}

0 commit comments

Comments
 (0)