aboutsummaryrefslogtreecommitdiffstats
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-08-12 16:31:07 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-09-09 09:58:36 -0400
commit2becf74c0b52ae039e0fcb51d5ee1e3e828debf6 (patch)
tree31c969d5d6df6987887b1be1ddee70bb3903b709 /.cirrus.yml
parent4fac6655bd329b89dcbab847837f23fea6763c22 (diff)
downloadsos-2becf74c0b52ae039e0fcb51d5ee1e3e828debf6.tar.gz
[cirrus] Upload logs from failed tests to GCE storage bucket
Adds failure handling to cirrus tasks that actually run sos so that if an error is encountered in the test suite, the logs from the tests are uploaded to the GCE cloud storage bucket associated with the GCE sos project. This will also make those logs available from the cirrus task page. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index cf7f77ba..c77289d4 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -124,6 +124,11 @@ report_stageone_task:
fi
setup_script: &setup 'pip3 install avocado-framework'
main_script: PYTHONPATH=tests/ avocado run --test-runner=runner -t stageone tests/{cleaner,collect,report,vendor}_tests
+ on_failure:
+ fail_script: &faillogs |
+ tar cf sos-fail-logs.tar /var/tmp/avocado*
+ log_artifacts:
+ path: "sos-fail-logs.tar"
# IFF the stage one tests all pass, then run stage two for latest distros
report_stagetwo_task:
@@ -154,6 +159,10 @@ report_stagetwo_task:
fi
setup_script: *setup
main_script: PYTHONPATH=tests/ avocado run --test-runner=runner -t stagetwo tests/{cleaner,collect,report,vendor}_tests
+ on_failure:
+ fail_script: *faillogs
+ log_artifacts:
+ path: "sos-fail-logs.tar"
report_foreman_task:
skip: "!changesInclude('.cirrus.yml', '**/{__init__,apache,foreman,foreman_tests,candlepin,pulp,pulpcore}.py')"
@@ -175,3 +184,7 @@ report_foreman_task:
remove_sos_script: *remove_sos
setup_script: *setup
main_script: PYTHONPATH=tests/ avocado run --test-runner=runner -t foreman tests/product_tests/foreman/
+ on_failure:
+ fail_script: *faillogs
+ log_artifacts:
+ path: "sos-fail-logs.tar"