strategies

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIncompleteUpdateCtx = errors.New("incomplete update context")
)

Errors relating to updating release versions.

Functions

func UpdateRelease

func UpdateRelease(ctx *UpdateCtx) (version.Semver, error)

UpdateRelease applies an update strategy to generate a new Chart version.

Types

type PublishStrategy

type PublishStrategy string

PublishStrategy defines the behavior that chart-releaser will use to publish updates and changes to a chart repository.

const (
	PublishCommit      PublishStrategy = "commit"
	PublishPullRequest PublishStrategy = "pull request"
)

The publish strategies supported by chart-releaser.

func ListPublishStrategies

func ListPublishStrategies() []PublishStrategy

ListPublishStrategies returns a slice of all supported PublishStrategies.

func PublishStrategyFromString

func PublishStrategyFromString(s string) (PublishStrategy, error)

PublishStrategyFromString returns the PublishStrategy corresponding to the provided string, if there is one.

type UpdateCtx

type UpdateCtx struct {
	OldAppVersion   *version.Semver
	NewAppVersion   *version.Semver
	OldChartVersion *version.Semver

	Strategy UpdateStrategy
}

UpdateCtx contains information needed to perform an update. Since the update to the Chart version may depend on the level at which the application version was incremented, this needs to hold both the new and old app version in order to detect drift, as well as the old chart version, which will be the seed for the new chart version.

func (*UpdateCtx) IsComplete

func (ctx *UpdateCtx) IsComplete() bool

IsComplete checks whether all versions needed by the UpdateCtx are specified.

type UpdateStrategy

type UpdateStrategy string

UpdateStrategy is a strategy used to increment the semantic version of a Helm Chart.

const (
	UpdateMajor   UpdateStrategy = "major"
	UpdateMinor   UpdateStrategy = "minor"
	UpdatePatch   UpdateStrategy = "patch"
	UpdateDefault UpdateStrategy = "default"
)

The update strategies that chart-releaser supports.

func ListUpdateStrategies

func ListUpdateStrategies() []UpdateStrategy

ListUpdateStrategies returns a list of all supported UpdateStrategies.

func UpdateStrategyFromString

func UpdateStrategyFromString(s string) (UpdateStrategy, error)

UpdateStrategyFromString returns the UpdateStrategy corresponding to the provided string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL