Version control in the DevOps pipeline
Change the application version number each time you deploy changes to a production system. As a best practice, use semantic versioning because it offers a logical set of rules about when to increase each version number. When semantic versioning is used, the part of the version number that is incremented communicates the significance of the change. Additional information about semantic versioning is available on the web.
The version number, in the format NN-NN-NN, defines the major version (first two digits), minor version (middle digits), and patch version (last digits), for example, 03-01-15.
- Major versions include significant features that might cause compatibility issues with earlier releases.
- Minor versions include enhancements or incremental updates.
- Patch versions include small changes such as bug fixes.
Rulesets include all versions of each rule. Skimming reduces the number of rules by collecting the highest version of rules in the ruleset and copying them to a new major or minor version of that ruleset, with patch version 01. For more information about skimming, see Skim to create a higher version.
Best practices for development
Follow these best practices for version control in development:
- Work in branches.
- Consider creating a major version of your application if you upgrade your application server or database server to a major new version.
- For small single scrum teams:
- Increment both the patch and the minor version during every merge.
- Developers merge into the next incremented patch version.
- For multiple scrum teams:
- The release manager selects a development ruleset version number that includes a patch version number.
- Developers merge into the highest available ruleset version.
Best practices for deployment
Follow these best practices when you deploy your application to production:
- Define target ruleset versions for production deployment.
- Use lock and roll to password-protect versions and roll changes to higher versions. For more information, see RuleSet Stack tab.
- Create restore points before each deployment. For more information about restore points, see Restore points.
- Set a separate ruleset version for each deployment to production.