Build, Testing & Deployment Automation: Source Control

Here’s an old post I just found that I had started a long time ago but apparently never finished. Posting as is…

 

We use SVN for our versioning, and TortoiseSVN on the client.

Since there is only one person working on the project, we’ve opted for a simple version control strategy. We use a simplified stable trunk strategy and release from /trunk. The goal is to keep /trunk releasable at any given moment. All development is done against a long-lived branch: /branches/_dev. When a feature is done (tested, documented, etc), it is merged to /trunk. Here is the complete process with each piece explained below:

 

Feature development is done against the development branch:

 

 

When a feature is done, it is merged into the trunk

If a feature is partially completed and a different story or bugfix needs to be worked on, the partially completed feature is shelved to a branch (/branches/-. Once the other work has been completed and checked in, the shelved branch is merged back in with the developer’s working copy of the development branch.

 

When we are ready to release, we the latest revision in /trunk and tag it.

 

 

If we find a bug in production that must be fixed immediately, we create a new branch from the last release tag (which means that we’re branching what we’re currently running in production) and call it /branches/hotfix-<hotfix story #>. We deploy to staging from the hotfix branch to verify that the hotfix worked, and then deploy to production from the hotfix branch. Once everything is confirmed to be working, the hotfix branch is tagged then removed.

 

 

Also, once the hotfix is confirmed to be working, it is merged back into the other branches (/trunk and /dev)