From c22e619f7e0e20b5777bd98995caaf767fbf6103 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Thu, 7 Jan 2021 17:11:50 -0800 Subject: [PATCH] Store test logs as artifacts if the build fails in CircleCI (#7812) Summary: If a workflow fails in CircleCI this will ensure that the `t/` directory is tar'd up and added to the workflow as an artifact. This allows us to download the detailed logs and see what went wrong. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7812 Reviewed By: zhichao-cao Differential Revision: D25761003 Pulled By: jay-zhuang fbshipit-source-id: 41cfd16c6385bfcc9fb35fb63df84f97d4b8b80b --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab309146c..7d76991a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,6 +62,14 @@ commands: path: /tmp/test-results - store_artifacts: # store LOG for debugging if there's any path: LOG + - run: # on fail, compress Test Logs for diagnosing the issue + name: Compress Test Logs + command: tar -cvzf t.tar.gz t + when: on_fail + - store_artifacts: # on fail, store Test Logs for diagnosing the issue + path: t.tar.gz + destination: test_logs + when: on_fail install-clang-10: steps: