Golang module

kind: golang/module

sourceconditiontarget

source

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

condition

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

target

the Golang module "target" is not supported.

Parameter

NameTypeDescriptionRequired
modulestring[S][C] Module specifies the name of the module
proxystringProxy may have the schemes https, http. file is not supported at this time. If a URL has no scheme, https is assumed [S][C] Proxy allows to override GO proxy similarly to GOPROXY environment variable.
versionstring[C] Defines a specific package 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 module example"

sources:
  default:
    kind: golang/module
    name: Get the latest Golang module version for github.com/Masterminds/semver/v3
    spec:
      module: "github.com/Masterminds/semver/v3"
      
  semver:
    kind: golang/module
    name: Get Golang module version for github.com/Masterminds/semver/v3 matching version 3.2
    spec:
      module: "github.com/Masterminds/semver/v3"
      versionfilter:
        kind: semver
        pattern: "3.2"

conditions:
  default:
    # The version is set by the sourceid "default"
    kind: golang/module
    name: Checks if version v3.2.0 exists for Golang module github.com/Masterminds/semver/v3
    sourceid: default
    spec:
      module: "github.com/Masterminds/semver/v3"

  noSourceInput:
    disablesourceinput: true
    kind: golang/module
    name: Checks if version v3.2.0 exists for Golang module github.com/Masterminds/semver/v3
    spec:
      module: "github.com/Masterminds/semver/v3"
      version: "v3.2.0"

Top