diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /scripts/pipeline_test_report_builder.rb | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) | |
download | gitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
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..649b68427ea 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.to_i == 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 |