diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-06 15:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-06 15:08:36 +0300 |
commit | c1f785fe21ee785618ef3bf0407fee166b6e0ecd (patch) | |
tree | 4807aa3c9dfa10ac1e52554057e407b1af310888 /scripts/pipeline_test_report_builder.rb | |
parent | 5d3eac1cf8820b5f95bf2085ccc246ea78f4b4d2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/pipeline_test_report_builder.rb')
-rwxr-xr-x | scripts/pipeline_test_report_builder.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/pipeline_test_report_builder.rb b/scripts/pipeline_test_report_builder.rb index 2101decf59a..5299dba3f97 100755 --- a/scripts/pipeline_test_report_builder.rb +++ b/scripts/pipeline_test_report_builder.rb @@ -72,6 +72,10 @@ class PipelineTestReportBuilder # Please see for more info: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69053#note_709939709 def test_report_for_build(pipeline, build_id) fetch("#{pipeline['web_url']}/tests/suite.json?build_ids[]=#{build_id}") + rescue Net::HTTPServerException => e + raise e unless e.response.code == 404 + + puts "Artifacts not found. They may have expired. Skipping this build." end def build_test_report_json_for_pipeline(pipeline) @@ -92,7 +96,8 @@ class PipelineTestReportBuilder test_report['suites'] ||= [] failed_builds_for_test_stage.each do |failed_build| - test_report['suites'] << test_report_for_build(pipeline, failed_build['id']) + suite = test_report_for_build(pipeline, failed_build['id']) + test_report['suites'] << suite if suite end end |