Version Control

Published date: April 15, 2024, Version: 1.0

Overview

Version control is a crucial capability that plays a significant role in driving higher software delivery and organizational performance. Version control systems such as Git, Subversion, and Mercurial enable teams to effectively organize files and coordinate their creation, controlled access, updating, and deletion across teams and organizations. In addition, there should be a system to version, store and manage build artifacts.

Version control is closely linked to automation and continuous integration. Automation and continuous integration rely on version control for the source code of the automation itself, as well as the configuration to be automated and the data to be distributed. By using version control for source code, test and deployment scripts, infrastructure and application configuration information, and the many libraries and packages they depend upon, teams can improve their software delivery process.

Within the version control system, teams must be able to query the current (and historical) state of their environments. Version control also provides direct benefits such as disaster recovery and possibility to , which are essential for ensuring the stability and reliability of the software delivery process. Overall, version control is a critical capability for any team or organization seeking to optimize their software delivery process and achieve high performance.

What should be versioned

  • Application code and dependencies

  • Any script used to create database schemas, application reference data

  • Environment creation tools and artifacts described in the previous step

  • File used to create and compose containers

  • All supporting automated tests and any manual test scripts

  • Any script that supports code packaging, deployment, database migration, and environment provisioning

  • Supporting project artifacts (for example, requirements documentation, deployment procedures, and release notes)

  • Container orchestration

  • All cloud configuration files

  • Any other script or configuration information required to create infrastructure that supports multiple services

Version Control practices

To optimize the software delivery process and achieve high performance, it is essential to implement several key practices related to version control and automation.

Create packages for every commit.

  • One such practice is to ensure that every commit to version control triggers the automated creation of packages that can be deployed to any environment using only information in version control. This approach streamlines the deployment process and reduces the risk of errors or inconsistencies.

Store created packages.

  • In addition to version control of a regular source code it is important to store packages created through the automation in an artifactory to simplify distribution and overall management of the produced software.

Define an intuitive and easy to follow naming convention.

  • Produced and version controlled packages should be properly named to indicate the stage of the package lifecycle and possible scope of changes.

On-demand test environment.

  • Another crucial practice is to make it possible to create production-like test environments on demand using only scripts and configuration information from version control. This enables teams to quickly and efficiently test new code and changes in a realistic environment, ensuring that any issues are identified and resolved before deployment. Additionally, this approach makes it easier to create packages using the automated process described in the previous approach.

Automate disaster recovery.

  • To further improve efficiency and reduce the risk of errors, it is important to script testing and production infrastructure so that teams can add capacity or recover from disasters in a fully automated fashion. This ensures that critical infrastructure is always available and that teams can quickly respond to changes or disruptions without manual intervention. Overall, by implementing these practices, teams can optimize their software delivery process and achieve high performance.

Adoption expectations

System Components  MVP MVP+

Store application code

+

+

Store system configurations

+

+

Store and version build artifacts

+

+

Map stored artifacts and software delivery process stage

+

+

Store application configuration

 

+

Store scripts for automating build and configuration

 

+

 

Tools

Functionality Tool Name

Version Control System

Git

Version Control Collaboration

Azure DevOps Repo, Bitbucket

Artifact Management System

JFrog Artifactory, Azure Artifacts

Roles

Name  Responsibilities

Scrum Master/Team Coach

Coach and support usage of version control and artifactory to manage changes

Developer

Adopt version control for all new changes

Decouple code and configuration changes

Build Engineer

Integrate automated quality gates and deployment process to promote new version control changes

System Engineer

Create and store infrastructure configurations in version control systems

Establish automated infrastructure creation and configuration from the version control

Test Automation Engineer (TAE)

Version control new automated tests and related test data