From d0b160888b04c1a3c0ca9dd22425ab8e46d8436a Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 30 Jul 2019 14:18:09 -0400 Subject: [PATCH] Archive all coverage reports, named by test context --- pavelib/utils/test/utils.py | 2 +- scripts/Jenkinsfiles/bokchoy | 7 +++++++ scripts/Jenkinsfiles/python | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pavelib/utils/test/utils.py b/pavelib/utils/test/utils.py index 0ba1f6d429..9a19473e36 100644 --- a/pavelib/utils/test/utils.py +++ b/pavelib/utils/test/utils.py @@ -186,6 +186,6 @@ def fetch_coverage_test_selection_data(options): def upload_coverage_to_s3(): upload_to_s3( COVERAGE_CACHE_BASELINE, - '{}/{}'.format(COVERAGE_CACHE_BASEPATH, 'reports/{}.coverage'.format(os.environ.get('TEST_SUITE'))), + '{}/{}'.format(COVERAGE_CACHE_BASEPATH, 'reports/{}.coverage'.format(os.environ.get('TEST_SUITE', ''))), COVERAGE_CACHE_BUCKET ) diff --git a/scripts/Jenkinsfiles/bokchoy b/scripts/Jenkinsfiles/bokchoy index 7bb64fc070..547c01b2d9 100644 --- a/scripts/Jenkinsfiles/bokchoy +++ b/scripts/Jenkinsfiles/bokchoy @@ -104,6 +104,13 @@ pipeline { } } } + post { + always { + script { + archiveArtifacts allowEmptyArchive: true, artifacts: 'reports/*.coverage' + } + } + } } } post { diff --git a/scripts/Jenkinsfiles/python b/scripts/Jenkinsfiles/python index 2fd561b679..cb9414fc12 100644 --- a/scripts/Jenkinsfiles/python +++ b/scripts/Jenkinsfiles/python @@ -175,7 +175,7 @@ pipeline { post { always { script { - archiveArtifacts allowEmptyArchive: true, artifacts: 'reports/${TEST_SUITE}.coverage' + archiveArtifacts allowEmptyArchive: true, artifacts: 'reports/*.coverage' publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'reports/cover', reportFiles: 'index.html', reportName: 'Coverage.py Report', reportTitles: ''])