Golang

kind: golang

sourceconditiontarget

source

The Golang "source" retrieves the Golang version matching then versioning rule.

condition

The Golang "condition" checks if the Golang version matching then versioning rule exist.

target

the Golang "target" is not supported.

Parameter

NameTypeDescriptionRequired
versionstring[C] Version defines a specific golang version
versionfilterobject[S] VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
    kindstringspecifies the version kind such as semver, regex, or latest
    patternstringspecifies the version pattern according the version kind
    strictbooleanstrict enforce strict versioning rule. Only used for semantic versioning at this time

Example

# updatecli.yaml
name: "Golang example"

sources:
  default:
    name: Get Golang version
    kind: golang
    spec:
      versionfilter:
        kind: semver
        pattern: "1.15.x"

conditions:
  # The version to check is inherited from source "default"
  default:
    name: Checks that golang version from source default exists
    kind: golang
    sourceid: default

  nosourceinput:
    disablesourceinput: true
    name: Checks that golang version 1.20.1 exists
    kind: golang
    spec:
      version: "1.20.1"
Top