validate

package
v1.9.13 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChartsRepository added in v1.9.0

func ChartsRepository(ctx context.Context, c *cli.Context, repoRoot string, rootFs billy.Filesystem, csOptions *options.ChartsScriptOptions, skip, remoteMode, localMode bool, chart string) error

ChartsRepository TODO

func CompareIndexFiles added in v1.9.9

func CompareIndexFiles(ctx context.Context, rootFs billy.Filesystem, branch string) error

CompareIndexFiles loads the local index.yaml and compares it against the live index.yaml from charts.rancher.io, returning an error if the two differ.

func Icons added in v1.9.9

func Icons(ctx context.Context, rootFs billy.Filesystem) error

Icons checks that every chart listed in release.yaml has a local icon present under a file:// path. Charts matching IsIconException are skipped.

func IsIconException added in v1.9.9

func IsIconException(chart string) bool

IsIconException reports whether the given chart name is exempt from icon validation.

func PullRequests added in v1.9.9

func PullRequests(ctx context.Context,
	token, prNum, branch string,
	dep *lifecycle.Dependencies) error

PullRequests validates a pull request against the release.yaml checkpoints:

  • Checkpoint 0: release.yaml is internally consistent and no released chart is modified
  • TODO Checkpoint 1: compare contents of assets/ to charts/
  • TODO Checkpoint 2: compare assets against index.yaml

func StatusExceptions added in v1.4.8

func StatusExceptions(ctx context.Context, status git.Status) error

StatusExceptions checks if the git repository is clean and if it is not, it checks if the changes are allowed

Types

type CompareGeneratedAssetsResponse added in v0.3.0

type CompareGeneratedAssetsResponse struct {
	// UntrackedInRelease represents charts that need to be added to the release.yaml
	UntrackedInRelease options.ReleaseOptions `yaml:"untrackedInRelease,omitempty"`
	// RemovedPostRelease represents charts that have been removed from the upstream
	RemovedPostRelease options.ReleaseOptions `yaml:"removedPostRelease,omitempty"`
	// ModifiedPostRelease represents charts that have been modified from the upstream
	ModifiedPostRelease options.ReleaseOptions `yaml:"modifiedPostRelease,omitempty"`
}

CompareGeneratedAssetsResponse tracks resources that are added, deleted, and modified when comparing two charts repositories

func CompareGeneratedAssets

func CompareGeneratedAssets(ctx context.Context, repoRoot string, repoFs billy.Filesystem, u options.UpstreamOptions, branch string, releaseOptions options.ReleaseOptions) (CompareGeneratedAssetsResponse, error)

CompareGeneratedAssets checks to see if current assets and charts match upstream, aside from those indicated in the release.yaml It returns a boolean indicating if the comparison has passed or an error

func (CompareGeneratedAssetsResponse) DumpReleaseYaml added in v0.3.0

func (r CompareGeneratedAssetsResponse) DumpReleaseYaml(ctx context.Context, repoFs billy.Filesystem) error

DumpReleaseYaml takes the response collected by this CompareGeneratedAssetsResponse and automatically creates the appropriate release.yaml, assuming that the user does indeed intend to add, delete, or modify all assets that were marked in this comparison

func (CompareGeneratedAssetsResponse) LogDiscrepancies added in v0.3.0

func (r CompareGeneratedAssetsResponse) LogDiscrepancies(ctx context.Context)

LogDiscrepancies produces logs that can be used to pretty-print why a validation might have failed

func (CompareGeneratedAssetsResponse) PassedValidation added in v0.3.0

func (r CompareGeneratedAssetsResponse) PassedValidation() bool

PassedValidation returns whether the response seems to indicate that the chart repositories are in sync

Jump to

Keyboard shortcuts

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