Git tags and versioning

Git tags are used to create a permanent state of code and separate it from the existing branches. Tags are not intended to be iterated upon, but rather, should be used as a marker in time for the state of the code. This makes tags a perfect fit for the release versioning of Puppet code. We can create tags from any branch, but the master is the most common branch to cut release tags from. We can simply use the git tag command on our module repository to create a snapshot with a semantic version number and push it to the origin repository, to be called on by r10k or Code Manager. The workflow for a Git tag is also short, as follows:

  1. Check out the target branch (usually the master) for the tag (git checkout)
  2. Version ...

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.