kapua
kapua copied to clipboard
Feature - CI process optimization
Brief description of the PR. This PR is a collection of optimizations for the CI configuration. They follow the work started with the PR https://github.com/eclipse/kapua/pull/3785. The scope of this work is not only to speed-up the build for our interest but also to reduce the utilization of resources running jobs that we share with other eclipse projects.
Description of the solution adopted First of all, in a separate investigation, I noticed that the 'kapua artifacts' (the ones created in the build job and later cached for the test jobs) could have been built with maven in multi-threading mode, because the plugins used for this build process are thread-safe (in contrast with the plugins used for building docker images, that are not thread-safe). As a consequence, I Inserted the multi-thread building with the '-1C' option, in this way 1 thread is spawn for each available core (this is nice in this GitHub environment because machines available for the build job could have different number of cores)
Running some tests locally, in the past, I realized that the kapua-api docker image is never used in tests so it is useless to re-build it in every test job as we do now. I created a separate job that builds it, to verify that no errors occur in the process, and removed from the tests job this work.
Finally, I noticed that the job for junit tests was retrieving the cached maven artifacts but this was not needed to run junit tests we have in the code (I also verified this fact launching locally these tests).
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 20.63%. Comparing base (
b073aaa
) to head (ccebfb3
). Report is 7 commits behind head on develop.
:exclamation: Current head ccebfb3 differs from pull request most recent head fb7c16f. Consider uploading reports for the commit fb7c16f to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## develop #3933 +/- ##
=============================================
+ Coverage 16.85% 20.63% +3.77%
+ Complexity 10 6 -4
=============================================
Files 1987 1947 -40
Lines 51803 41691 -10112
Branches 4422 3954 -468
=============================================
- Hits 8733 8604 -129
+ Misses 42666 32688 -9978
+ Partials 404 399 -5
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 16.78%. Comparing base (
be87c67
) to head (b70972e
).
:exclamation: Current head b70972e differs from pull request most recent head a52bb7e. Consider uploading reports for the commit a52bb7e to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## develop #3933 +/- ##
==========================================
Coverage 16.78% 16.78%
Complexity 10 10
==========================================
Files 1987 1987
Lines 51835 51835
Branches 4422 4422
==========================================
Hits 8702 8702
Misses 42730 42730
Partials 403 403