Versioning
InfraWeave simplifies the process of publishing, managing, and promoting versions of modules across various environments. This approach is designed to support development, testing, and production workflows seamlessly, as well as accommodate custom environments like feature branches.
Key Concepts
Tracks: Defines the context in which a module operates. There are 5 available tracks, and are isolated to make it easy to follow.
Available tracks are:
- stable (e.g. 1.2.7 or 2.0.1, …)
- rc (e.g. 1.2.7-rc.2, …)
- beta (e.g. 1.2.7-beta or 2.0.1-beta.4, …)
- alpha (e.g. 1.2.7-alpha or 2.0.1-alpha.4, …)
- dev (e.g. 1.2.7-dev+feature.x.branch or 2.0.1-dev+feature.x.branch.4, …)
Publishing a Version: Modules are versioned entities. You can publish a new version of a module to a specific track using the CLI.
A version is specified in the module.yaml
manifest. When publishing you again have to specify the desired track, which has to match, to avoid accidental publishes to e.g. stable.
Automatic tracking: It is possible to follow a track, meaning an application team can specify a track + major instead of a version. This means it is not necessary to look up the latest version. Could be useful for small teams that do not use renovate. TODO
Workflow
Publishing: Use the CLI to publish a new version of a module to a designated environment. For instance, when adding a new feature a descriptive branch name can be provided after -dev
following a +
-sign to indicate metadata, and a version number.
apiVersion: infraweave.io/v1kind: Modulemetadata: name: s3bucketspec: moduleName: S3Bucket version: 0.1.4-dev+add.versioning.configuration.option.1 reference: https://github.com/my-org/my-s3-module description: | Description about S3 Bucket here...
This can then be published to the dev
-track (current folder)
infraweave publish dev .
If you are using the provided GitHub actions this is automatically done for you.
Releasing
When merging this branch to a release branch, start with specifying the desired track
apiVersion: infraweave.io/v1kind: Modulemetadata: name: s3bucketspec: moduleName: S3Bucket
version: 0.1.5-beta.1 reference: https://github.com/my-org/my-s3-module description: | Description about S3 Bucket here...
Then in order to publish to the beta
-track (or replace with another track):
infraweave publish beta .