The process of building software follows well defined steps:
- Source code and other artifacts are compiled and assembled into some sort of deployable artifacts. Primary tools in this spaces are
- Simple scripts
- Make
- IMake
- Ant
- Maven
- Groovy
- go build
- cargo build
- etc.
- Quality control steps are applied, either manual or automated:
- Manual Testing
- Unit Testing (JUnit, NUnit, cargo test, go test, etc.)
- Integration Testing
- System Testing
- User Testing
- Load and Performance Testing
- Security Testing
- Usability Testing
- etc.
- The software is delivered. This can take many different forms:
- Manual installation
- Automatic patching (Patch Tuesday)
- Made available in a repository like Maven Central, docker hub, etc.
The major evolution in this process has not been the steps, but rather the boundaries between them. When I first started, each and every step of this process was a manual handoff. Now, large numbers of companies have software automatically migrating to a production environment if a change passes automated quality control steps. And there is everything in between.
So how do you choose the right process for your environment? Focus on the following principals:
- Risk management - your process needs to reflect the risk you are taking with the change:
- A failed simple A/B color scheme test for a GUI has a generally low risk so more automation is ok there.
- A change to an API that transfers money using a banking API might find yourself on the front page of the newspaper. In that case, having a human double check that the unit testing actually ran and reported correctly and that the correct banks where involved is totally reasonable.
- Process and productivity - every manual step is one more place were having the wrong person on vacation or out sick can kill your productivity. This is the inverse of risk.
- For example, if every build requires that a DBA manually apply schema changes and run conversion scripts you will have lower cycle time than if that process is automated.
- If you have automated migrations so that those same migration happen in the middle of a testing cycle, you will have invalidated that work.
- Communication - every step needs to be visible to those involved. This includes things like:
- Build tags in source control - I've always used a variation on <major version>.<minor version>.<build number> where the build number increments for all builds that pass automated unit testing.
- Build status - red, green, in-progress is the bare minimum. A more feature full status will handle multiple parallel builds on the same component and show the current steps that are active and their outputs.
- Feedback to change agents - this should be more than an e-mail to the development group, it should include project management, quality control, support staff and anyone else who impacts the build process.
In summary, treat your build process like a good group presentation: tell them what your going to build, build and test it, then tell them what the outcome was.
Comments
Post a Comment