changedfiles

package
v1.0.102 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package changedfiles maps a list of updated files in the terra-helmfile repo to a list of charts that need to be published.

The logic is as follows: * Changes to charts/<chartname>/* or values/(app|cluster)/<chartname>* will trigger a publish of the affected chart * Changes to values/app/global* will trigger a publish of all app release charts * Changes to values/cluster/global* will trigger a publish of all cluster release charts * Changes to helmfile.yaml will trigger a publish/render of all charts that have at least one chart release * Finally, any charts that are transitive dependencies of charts in the above list will be published as well

Index

Constants

View Source
const FlagName = "changed-files-list"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangedFiles

type ChangedFiles interface {
	// ChartList returns a list of charts that need to be published/released based on the list of changed files
	//
	// Note that inputFile should be path to a file that contains a newline-separated list of files
	// that were updated by a PR.
	//
	// All paths in the file should be relative to the root of the terra-helmfile repo.
	//
	// Example contents:
	//   charts/agora/templates/deployment.yaml
	//   helmfile.yaml
	//   values/cluster/yale/terra.yaml
	//
	// Note that charts that depend on global values, but don't exist in the chart source directory (i.e., datarepo),
	// are excluded from the list.
	ChartList(inputFile string) ([]string, error)
	// ReleaseFilter is like ChartList, except it returns a filter that matches all terra.Release instances that
	// use a chart that would be published, based on the given list of changed files
	//
	// Note that releases that depend on global values, but don't exist in the chart source directory (i.e., datarepo),
	// will be included by the filter.
	ReleaseFilter(inputFile string) (terra.ReleaseFilter, error)
}

func New

func New(chartsDir source.ChartsDir, state terra.State) ChangedFiles

Jump to

Keyboard shortcuts

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