Object-Oriented Build Automation – A Case Study
DOI:
https://doi.org/10.31577/cai_2021_4_754Keywords:
Build automation, continuous integration, object oriented approach, incremental build, .NET, Cake FrostingAbstract
Fast and precise build and deployment automation is a fundamental task for every project oriented on rapidly appearing changes. As a rule of thumb, the tools used for this task work as procedural-declarative frameworks – often overlooking the extra requirements for large projects like easy parallelization, precise targeting of specific subsystem or general code readability. In this article we document our findings in build automation as we have abandoned the procedural-declarative approach to object-oriented perspective of our setup environment – all implemented in the .NET build automation framework Cake Frosting. Due to the clear separation of the various layers of our system and our codebase we are able to fire up our new build-deployment routines at ease and at specific part of our ecosystem. As the whole routine is written as a C# console application we can easily manage some aspects of parallel execution (i.e. number of threads) of some tasks which results in great drop of job execution time. To further improve the execution time, we introduce the concept of proof-of-work which is a file that stores the information about the last successful build. Together, all of our concepts resulted in a fast build-deployment routine – as in pessimistic scenario we managed to drop to about 30 % of the original time. We believe that others may benefit from our case study as the concepts proposed here can be easily incorporated to any other project written in .NET (or one that is built using object-oriented command-line application) – though we would not recommend using our approach in small projects (in terms of KLOC).