Building & Packaging code
- Building or packaging code is to convert the code into some format to simplify deployment/installations.
- Possible Variants:
- Compile into OS binaries:
- This basically means the compilation output (artifacts/binaries/package) can run directly on OS with out any extra dependencies
- Languages
- C
- C++
- Golang
- Examples:
- Terraform
- Docker
- VLC
- For this category we need to generate builds for every OS Combination.
- We need to configure build for every posssible os
- Compile into Language binaries:
- Compilation output requires some softwares/dependencies to be installed on the machine to run.
- Languages:
- Java
- Dotnet
- To run java application we need JRE and to build/develop java we need jdk and to run dotnet application we need to install dotnet framework
- We need to configure build which works on any supported os.
- Copy the code and run: This generally requires the language/sdk to run.
- Languages:
- HTML
- Javascript
- Python
- Languages:
- Compile into OS binaries:
- Build types:
- full build
- incremental build
- Versions
- Release Versions
- Dev Versions
- Conventions:
- Day builds: This is a unit of work done by developer(s) during their active work hours.
- Nightly builds: This represents work done during the whole working day. Generally these versions go through full testing with hours of automated test execution.
Building Projects
- As we have discussed building individual files is not a feasible apporach in larger projects, we need some kind of tool to build entire code in a project/repo
- make popular GNU project
- Apache Ant was released to build java projects
- The above two are based on configuration principle
- Apache maven was released which used conventions over configurations.
