File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 16
16
load (
17
17
"github.com/SonarSource/cirrus-modules/cloud-native/actions.star@analysis/master" ,
18
18
"default_gradle_on_failure" ,
19
+ "gradle_junit_xml_report_artifacts"
19
20
)
20
21
22
+
21
23
# SHARED CANDIDATE?
22
24
# Looks like : https://github.com/SonarSource/sonar-iac/blob/153aed5008efac5ff1bbb0014672e653194ee79b/.cirrus/modules/build.star#L48
23
25
def build_env ():
@@ -59,7 +61,22 @@ def build_task():
59
61
"path" : "build/reports/profile/profile-*.html"
60
62
}
61
63
},
62
- "on_failure" : default_gradle_on_failure (),
64
+ "on_failure" : {
65
+ "junit_artifacts" : gradle_junit_xml_report_artifacts (),
66
+ "flatten_report_script" : [
67
+ # language=bash
68
+ """
69
+ find . -type d -path \\ */build/reports/tests | while read -r test_dir; do
70
+ project_name=$(basename $(realpath ${test_dir}/../../..))
71
+ mkdir -p ${project_name}-test-report
72
+ cp -r "${test_dir}"/test/* ${project_name}-test-report
73
+ done
74
+ """
75
+ ],
76
+ "flattened_report_artifacts" : {
77
+ "path" : "*-test-report/**"
78
+ }
79
+ }
63
80
}
64
81
}
65
82
You can’t perform that action at this time.
0 commit comments