Skip to content

Commit ee42cab

Browse files
committed
ci: archive bazel logs
Signed-off-by: Vitor Bandeira <[email protected]>
1 parent 4f6203e commit ee42cab

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Jenkinsfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,14 @@ def bazelTest = {
260260
stage('Bazel Build') {
261261
withCredentials([file(credentialsId: 'bazel-cache-sa', variable: 'GCS_SA_KEY')]) {
262262
timeout(time: 120, unit: 'MINUTES') {
263-
def cmd = 'bazelisk test --config=ci --show_timestamps --test_output=errors --curses=no --force_pic'
264-
if (env.BRANCH_NAME != 'master') {
265-
cmd += ' --remote_upload_local_results=false'
266-
}
267-
sh label: 'Bazel Build', script: cmd + ' --google_credentials=$GCS_SA_KEY ...'
263+
def cmd = 'bazelisk test --config=ci --show_timestamps --test_output=errors --curses=no --force_pic';
264+
if (env.BRANCH_NAME != 'master') {
265+
cmd += ' --remote_upload_local_results=false';
266+
}
267+
sh label: 'Bazel Build', script: cmd + ' --google_credentials=$GCS_SA_KEY ...';
268268
}
269+
sh label: 'Archive logs', script: 'tar zcvf bazel-logs.tgz bazel-testlogs/.';
270+
archiveArtifacts artifacts: 'bazel-logs.tgz';
269271
}
270272
}
271273
}

0 commit comments

Comments
 (0)