source

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoReleaser

type AutoReleaser interface {
	// UpdateReleaseVersion updates the version file
	UpdateReleaseVersion(chart Chart, version string) error
}

AutoReleaser bumps chart versions in versions/app/dev.yaml & friends when a new chart version is released

func NewAutoReleaser

func NewAutoReleaser(versions gitops.Versions) AutoReleaser

type Chart

type Chart interface {
	// Name returns the name of this chart
	Name() string
	// Path returns the path to this chart on disk
	Path() string
	// BumpChartVersion updates chart version in chart.yaml
	BumpChartVersion(latestPublishedVersion string) (string, error)
	// UpdateDependencies runs `helm dependency update` on the local copy of the chart.
	UpdateDependencies() error
	// PackageChart runs `helm package` to package a chart
	PackageChart(destPath string) error
	// GenerateDocs re-generates README documentation for the given chart
	GenerateDocs() error
	// LocalDependencies returns the names of local dependencies / subcharts (using Helm's "file://" repo support)
	LocalDependencies() []string
	// SetDependencyVersion sets the version of a dependency in this chart's Chart.yaml
	SetDependencyVersion(dependencyName string, newVersion string) error
	// ManifestVersion returns the version of this chart in Chart.yaml
	ManifestVersion() string
}

Chart represents a Helm chart source directory on the local filesystem.

func NewChart

func NewChart(chartSourceDir string, shellRunner shell.Runner) (Chart, error)

NewChart constructs a Chart

type ChartManifest

type ChartManifest struct {
	Name         string
	Version      string
	Dependencies []struct {
		Name       string
		Repository string
		Version    string
	}
}

ChartManifest struct used to unmarshal Helm chart.yaml files.

type ChartsDir

type ChartsDir interface {
	// Given a set of charts to release, release new versions of them, as well as any downstream dependents.
	// For example, if chart `bar` depends on chart `foo`, Release([]string{`foo`}) will also release `bar`.
	//
	// Returns a map representing the names and versions of charts that were released. Eg.
	// {
	//   "foo": "1.2.3",
	//   "bar": "0.2.0",
	// }
	Release(chartNames []string) (releasedVersions map[string]string, err error)
}

ChartsDir represents a directory of Helm chart sources on the local filesystem.

func NewChartsDir

func NewChartsDir(
	sourceDir string,
	publisher publish.Publisher,
	versions gitops.Versions,
	shellRunner shell.Runner,
) (ChartsDir, error)

NewChartsDir constructs a new ChartsDir

type MockChart

type MockChart struct {
	mock.Mock
}

func NewMockChart

func NewMockChart() *MockChart

func (*MockChart) BumpChartVersion

func (c *MockChart) BumpChartVersion(latestPublishedVersion string) (string, error)

func (*MockChart) GenerateDocs

func (c *MockChart) GenerateDocs() error

func (*MockChart) LocalDependencies

func (c *MockChart) LocalDependencies() []string

func (*MockChart) ManifestVersion

func (c *MockChart) ManifestVersion() string

func (*MockChart) Name

func (c *MockChart) Name() string

func (*MockChart) PackageChart

func (c *MockChart) PackageChart(destPath string) error

func (*MockChart) Path

func (c *MockChart) Path() string

func (*MockChart) SetDependencyVersion

func (c *MockChart) SetDependencyVersion(dependencyName string, newVersion string) error

func (*MockChart) UpdateDependencies

func (c *MockChart) UpdateDependencies() error

Jump to

Keyboard shortcuts

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