Skip to content

Build Automation

Software builds convert files and other assets into a software product in its consumable form. Build automation includes the associated processes of compiling source code into binary code, packaging binary code, and running automated tests. (source). Each language has various associated build tools, each giving developers a better experience by automating common tasks.

Why build automation

If DevOps is about introducing automation to increase the developer's experience, the build automation is the first step in a DevOps way of working. Build automation tools allow the automation of simple, repeatable tasks.

  • removes unnecessary manual steps
  • executes common steps instantly
  • consistent build process across development team's environments
  • uses instructions from a file which also serves as documentation
  • resolve and manage dependencies
  • maintains versioning

Build automation is considered the first engineering step in moving toward implementing a culture of Continuous Delivery and DevOps.

Local Builds

This includes utilities like Make, Rake, Cake, MSBuild, Maven or Gradle. Their primary purpose is to generate build artifacts through activities like compiling and linking source code. Build automation tools provide the common capabilities that simplify developer's workflow:

  • validate source code and dependencies
  • execute (unit) tests
  • compile source code
  • launch the application

Build Server

Builds on the build server utilize the shared repository on the git server. These are triggered from a change in the source code, such as a commit, pull request, or merge. Often referred to as the continuous integration (CI) server, these builds produce deployable artifacts as part of the continuous delivery pipeline.

  • everything from local builds
  • versions artifact
  • produce immutable artifact

Best practices

  • Local development can read from - but not write to - artifact storage
  • Only the CI server can write to artifact storage
  • Use containerized applications and builder images to reduce drift from local and build server.

Artifacts should be published only from the continuous delivery pipeline