Skip to content

Commit af75fd6

Browse files
authored
Add reporting for release CodeBuild jobs (#2833)
Trawling through the logs looking for the tests that failed is time consuming, especially because tests are run in parallel, making the logs harder to follow. This uses the test result dashboarding feature from CodeBuild to make it much easier and faster to find tests that failed during a release.
1 parent 51a4d45 commit af75fd6

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

buildspecs/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,11 @@ phases:
1515
cd test/module-path-tests
1616
mvn package
1717
mvn exec:exec -P mock-tests
18-
fi
18+
fi
19+
finally:
20+
- mkdir -p codebuild-test-reports
21+
- find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;
22+
reports:
23+
UnitTests:
24+
files:
25+
- 'codebuild-test-reports/**/*'

buildspecs/integ-test.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@ phases:
2323
cd test/module-path-tests
2424
mvn package
2525
mvn exec:exec -P integ-tests
26-
fi
26+
fi
27+
finally:
28+
- mkdir -p codebuild-test-reports
29+
- find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;
30+
reports:
31+
IntegTests:
32+
files:
33+
- 'codebuild-test-reports/**/*'

buildspecs/stability-test.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,11 @@ phases:
77

88
build:
99
commands:
10-
- mvn clean install -P stability-tests -pl :stability-tests --am
10+
- mvn clean install -P stability-tests -pl :stability-tests --am
11+
finally:
12+
- mkdir -p codebuild-test-reports
13+
- find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;
14+
reports:
15+
StabilityTests:
16+
files:
17+
- 'codebuild-test-reports/**/*'

0 commit comments

Comments
 (0)