Skip to content

[Feature] Introducing a new templating mechanism to support different workflows #3305

@HHobeck

Description

@HHobeck

Is your improvement request related to a problem? Please describe.
In the discussion of issue #2388 ([Feature] Root configuration should propagate to branches) I came up with the idea of introducing a new templating mechanism to support different workflows (see #2388 (comment)).

Detailed Description

In the current version of gitversion we are supporting only one default workflow with the name gitflow. If we want to support more workflows then we need to introduce a templating mechanism like maybe in kubernetes.

Context

This feature gives the user the possibility to easily switch from one workflow to another without specifying the hole configuration. Another use case might be to specify a workflow from scratch without using any predefined configurations. This mechanism can be integrated into the initialization wizard refactoring initiative of issue #3229 ([Improvement] Revamp init wizard for v6) very easily.

Initialization wizard questions:

Question 1: What kind of workflow you are using?

  • GitFlow
  • GitHubFlow
  • CustomFlow from scratch

Question 2: What is your versioning mode?

  • ContinuousDeployment
  • ContinuousDelivery
  • Mainline

...

Possible Implementation

Example 1: from GitFlow workflow

workflow: GitFlow/v1
assembly-versioning-scheme: MajorMinorPatchTag
assembly-file-versioning-scheme: MajorMinorPatchTag
assembly-informational-format: '{MajorMinorPatch}+{Sha}'
mode: ContinuousDeployment
branches: {
    "release": {
      "tracks-release-branches": true
    }
}

Example 2: from GitHub

workflow: GitHub/v1
assembly-versioning-scheme: MajorMinorPatchTag
assembly-file-versioning-scheme: MajorMinorPatchTag
assembly-informational-format: '{MajorMinorPatch}+{Sha}'
mode: ContinuousDeployment
branches: {
    "main": {
      "tracks-release-branches": true
    }
}

Example 3: from scratch

workflow: ''
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions