Dagweave catalog

Bump a semantic version

semver-bumpv1.0.0updated 2026-07-171 version

Compute the next semantic version from a base version and a bump type (major/minor/patch), exposing the result as an Argo output parameter for downstream steps.

Install v1.0.0

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/semver-bump/1.0.0/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/semver-bump/1.0.0/template.yaml

Facts

Category
CI/CD
Tags
alpine ci-cd
Entrypoint
bump
Template SHA-256
585a7f70d637a157b7e5368e29cd33a70041afb15bf885b29d7366d7a647ef23
Source
semver-bump at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
alpinenone recordedsha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a

Parameters

NameDescriptionDefault
current-version required The current version to bump from.
Example 1.4.2
none
bump Which part of the version to increment.
One of major, minor, patch
patch

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: semver-bump
  labels:
    dagweave.io/catalog-item: semver-bump
  annotations:
    # The catalog semver this manifest was authored at. The dagweave app records
    # (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
    dagweave.io/catalog-version: "1.0.0"
    dagweave.io/catalog-category: "CI/CD"
spec:
  entrypoint: bump
  templates:
    - name: bump
      inputs:
        parameters:
          # The current version to bump from, e.g. "1.4.2" or "v1.4.2".
          - name: current-version
          # Which part to increment: major, minor or patch.
          - name: bump
            default: patch
      outputs:
        parameters:
          # The computed next version, exposed as an Argo output parameter so
          # downstream steps can consume it via
          # {{steps.<name>.outputs.parameters.next-version}} (or tasks.* in a DAG).
          - name: next-version
            valueFrom:
              path: /tmp/next-version
      container:
        # Pinned by digest per the catalog convention: an image rebuild can never
        # silently change the behaviour of an already-released item version.
        # alpine:3.24 — POSIX shell is enough to parse and increment a semver.
        image: alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a
        command: [sh, -c]
        # The current version and bump type are passed as env vars (below), never
        # interpolated from Argo into the shell. The result is written to
        # /tmp/next-version, which the outputs.parameters valueFrom.path reads.
        args:
          - |
            set -eu
            V="${CURRENT#v}"
            MAJOR="${V%%.*}"
            REST="${V#*.}"
            MINOR="${REST%%.*}"
            PATCH="${REST#*.}"
            # Drop any pre-release / build metadata suffix on the patch component.
            PATCH="${PATCH%%[-+]*}"
            case "$BUMP" in
              major) MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0 ;;
              minor) MINOR=$((MINOR + 1)); PATCH=0 ;;
              patch) PATCH=$((PATCH + 1)) ;;
              *) echo "invalid bump type: $BUMP (want major|minor|patch)" >&2; exit 1 ;;
            esac
            printf '%s.%s.%s' "$MAJOR" "$MINOR" "$PATCH" | tee /tmp/next-version
        env:
          - name: CURRENT
            value: "{{inputs.parameters.current-version}}"
          - name: BUMP
            value: "{{inputs.parameters.bump}}"

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.0 latest 2026-07-17

    Initial release.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/semver-bump/1.0.0/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/semver-bump/1.0.0/template.yaml

    version document, template.yaml

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/semver-bump \
  -p current-version=1.4.2

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: semver-bump-
spec:
  workflowTemplateRef:
    name: semver-bump
  arguments:
    parameters:
      - name: current-version
        value: "1.4.2"

As a step of a larger workflow

steps:
  - - name: semver-bump
      templateRef:
        name: semver-bump
        template: bump