Skip to content

Commit 856f98b

Browse files
committed
jenkins: tweak bazel build
Signed-off-by: Øyvind Harboe <oyvind@ascenium.com>
1 parent 320b89c commit 856f98b

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

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)