We're going to follow for Semantic Versioning for our web applications, it looks really nice. Now, Jenkins used as CI/CD tools. We want to use Octopus Deploy as artifacts storage and CD tool, also for fast redeployment/rollbacks and other configuration features.
Octopus requires packages with concrete version (for example: 1.2.4). Therefore, we also need strong versioning for our web applications. Otherwise, how to detect what version was deployed and has bugs.
Solution described here is not transparent and doesn't fully match to semantic versioning:
[assembly: AssemblyVersion("1.0.*")]
Because, Patch version should increment one-by-one from 0, not from "random" number, and resets after Minor increment.
For my opinion - it's better to store version in the repository in the same view (1.2.4) as in package. But I found only this ways how to implement it:
- Manual increment before commit - uncomfortably and has risks.
- Auto increment from SVN/Git hooks before commit - requires to configure every workstation.
- Auto increment from CI tool and commit - makes circular dependency with CI monitoring for changes in repository.
Is there any other ways to implement equal versioning as in repository, as in packages for web application? Or maybe that is unnecessary?
UPDATE 2017-02-28: We found that Jenkins can skip commits from specific users or with specific messages (in Advanced settings). It solves problem with auto increment from CI tool and commit (circular dependency between CI monitoring and changes in repository).