releaser

package
v1.1.20 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package releaser is the main orchestrator for releasing new charts. It can be thought of as the main entrypoint all the other logic in the charts/ package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartReleaser

type ChartReleaser interface {
	// Release calculates out downstream dependents of the given charts, increments versions,
	// and publishes new chart packages to the Helm repo.
	//
	// Note that Release will release downstream dependents of the charts it is given. In other words, if chart `bar`
	// depends on chart `foo`, just including `foo` in the chartNames will also publish and release `bar`.
	//
	// Params:
	// chartsToPublish: a list of chart names that should be published. Eg. ["foo"]
	// changeDescription: freeform text used to annotate the chart version in Sherlock. Usually corresponds to PR commit message.
	//
	// Return:
	// a map representing the names and versions of charts that were published and released. Eg.
	// {
	//   "foo": "1.2.3",
	//   "bar": "0.2.0",
	// }
	//
	Release(chartsToPublish []string, changeDescription string) (publishedVersions map[string]VersionPair, err error)
}

ChartReleaser is the main orchestrator for releasing new charts.

func NewChartReleaser

func NewChartReleaser(chartsDir source.ChartsDir, publisher publish.Publisher, deployedVersionUpdater *DeployedVersionUpdater) ChartReleaser

type DeployedVersionUpdater

type DeployedVersionUpdater struct {
	SherlockUpdaters         []sherlock.ChartVersionUpdater
	SoftFailSherlockUpdaters []sherlock.ChartVersionUpdater
}

DeployedVersionUpdater offers a UpdateChartReleaseVersions to take a newly published chart and update development instances to use it. It stores lists of different update mechanisms so they can be easily enabled/disabled by the caller. This is a literal struct, not an interface, so the callers can configure it out without needing to pass multiple parameters around.

func (*DeployedVersionUpdater) ReportNewChartVersion added in v1.1.13

func (a *DeployedVersionUpdater) ReportNewChartVersion(chartName string, versions VersionPair, description string) error

func (*DeployedVersionUpdater) UpdateChartReleaseVersions added in v1.1.13

func (a *DeployedVersionUpdater) UpdateChartReleaseVersions(chartName string, releases []terra.Release, versions VersionPair, description string) error

type VersionPair added in v1.1.12

type VersionPair struct {
	// version of the chart directly preceding NewVersion
	PriorVersion string
	// the new version of the chart that will be published
	NewVersion string
}

Jump to

Keyboard shortcuts

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