cross

package
v0.54.4 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Release

type Release struct {
	// Name is the name of the release.
	Name string

	// Releases is the list of releases for a given release name across multiple environments.
	Releases []*v1alpha1.Release

	// PromotedFile is the merged file for release from source to target environment, assuming the only environments
	// are respectively source and target. If merged result is same as target, then no promotion is needed and
	// PromotedFile is nil. This must be explicitly computed via ComputePromotedFile().
	PromotedFile *yml.File

	VersionInSync bool
	ValuesInSync  bool
}

Release describes a given release across multiple environments

func NewRelease

func NewRelease(name string, environments []*v1alpha1.Environment) *Release

func (*Release) ComputePromotedFile

func (r *Release) ComputePromotedFile(sourceEnv, targetEnv *v1alpha1.Environment) error

ComputePromotedFile computes the promotion merged file for release from source to target environment, assuming the only environments are respectively source and target. If merged result is same as target, then no promotion is needed and PromotedFile is nil.

type ReleaseList

type ReleaseList struct {
	Environments []*v1alpha1.Environment
	Items        []*Release
}

ReleaseList describes multiple releases across multiple environments

func LoadReleaseList

func LoadReleaseList(allFiles []*yml.File, environments []*v1alpha1.Environment, projects []*v1alpha1.Project, releaseFilter filtering.Filter) (ReleaseList, error)

LoadReleaseList loads all releases for given environments underneath the given base directory.

func MakeReleaseList added in v0.39.0

func MakeReleaseList(environments []*v1alpha1.Environment) ReleaseList

MakeReleaseList creates a new ReleaseList

func (*ReleaseList) Filter added in v0.47.0

func (r *ReleaseList) Filter(fn func(release *Release) bool) ReleaseList

func (*ReleaseList) GetEnvironmentIndex added in v0.38.1

func (r *ReleaseList) GetEnvironmentIndex(environment *v1alpha1.Environment) int

func (*ReleaseList) GetEnvironmentIndexByName added in v0.42.1

func (r *ReleaseList) GetEnvironmentIndexByName(name string) int

GetEnvironmentIndexByName returns the index of the environment with the given name or -1 if not found.

func (*ReleaseList) GetEnvironmentRelease added in v0.38.0

func (r *ReleaseList) GetEnvironmentRelease(environment *v1alpha1.Environment, releaseName string) (*v1alpha1.Release, error)

func (*ReleaseList) GetNonPromotableReleases added in v0.31.2

func (r *ReleaseList) GetNonPromotableReleases(sourceEnv, targetEnv *v1alpha1.Environment) []string

GetNonPromotableReleases returns a list of names of releases that cannot be promoted based on the version format allowed at the target environment.

func (*ReleaseList) GetReleasesForPromotion

func (r *ReleaseList) GetReleasesForPromotion(sourceEnv, targetEnv *v1alpha1.Environment) (ReleaseList, error)

GetReleasesForPromotion returns a subset of the releases in this list that are promotable, with only the given source and target environments as first and second environments.

func (*ReleaseList) HasAnyPromotableReleases

func (r *ReleaseList) HasAnyPromotableReleases() bool

func (*ReleaseList) OnlySpecificReleases

func (r *ReleaseList) OnlySpecificReleases(releases []string) (ReleaseList, error)

OnlySpecificReleases returns a subset of the releases in this list that match the given names.

func (*ReleaseList) RemoveReleasesByName added in v0.47.0

func (r *ReleaseList) RemoveReleasesByName(releases []string) (ReleaseList, error)

func (*ReleaseList) ResolveEnvRefs

func (r *ReleaseList) ResolveEnvRefs(environments []*v1alpha1.Environment)

func (*ReleaseList) ResolveProjectRefs

func (r *ReleaseList) ResolveProjectRefs(projects []*v1alpha1.Project) error

func (*ReleaseList) SortedCrossReleases

func (r *ReleaseList) SortedCrossReleases() []*Release

Jump to

Keyboard shortcuts

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