config

package
v0.0.0-...-d7993bf Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProdProwEnv    ProwEnv = "prow"
	StagingProwEnv ProwEnv = "prow-staging"

	OrgName  = "knative"
	RepoName = "test-infra"
	PRHead   = "autoupdate"
	PRBase   = "master"
	// the label that needs to be applied on the PR to get it automatically merged
	AutoMergeLabel = "auto-merge"

	PullBotName          = "pull[bot]"
	PullEndpointTemplate = "https://pull.git.ci/process/%s/%s"
)

Variables

View Source
var (
	// Env path
	ProdConfigRoot    = filepath.Join(configPath, prodConfigDirName)
	StagingConfigRoot = filepath.Join(configPath, stagingConfigDirName)
	// Prow config root paths.
	ProdProwConfigRoot    = filepath.Join(ProdConfigRoot, prowConfigDirName)
	StagingProwConfigRoot = filepath.Join(StagingConfigRoot, prowConfigDirName)
	// Prow build cluster config root paths.
	ProdProwBuildclusterConfigRoot    = filepath.Join(ProdConfigRoot, prowBuildclusterConfigDirName)
	StagingProwBuildclusterConfigRoot = filepath.Join(StagingConfigRoot, prowBuildclusterConfigDirName)
	// Prow config templates paths.
	ProdProwConfigTemplatesPath    = filepath.Join(configTemplatePath, string(ProdProwEnv))
	StagingProwConfigTemplatesPath = filepath.Join(configTemplatePath, string(StagingProwEnv))

	// Config paths that need to be handled by prow-config-updater if files under them are changed.
	ProdProwConfigPaths = []string{
		filepath.Join(ProdProwConfigRoot, core),
		filepath.Join(ProdProwConfigRoot, jobs),
		filepath.Join(ProdProwConfigRoot, cluster),
		filepath.Join(ProdProwConfigRoot, boskos),

		filepath.Join(ProdProwBuildclusterConfigRoot, cluster),
		filepath.Join(ProdProwBuildclusterConfigRoot, boskos),
	}
	StagingProwConfigPaths = []string{
		filepath.Join(StagingProwConfigRoot, core),
		filepath.Join(StagingProwConfigRoot, jobs),
		filepath.Join(StagingProwConfigRoot, cluster),
		filepath.Join(StagingProwConfigRoot, boskos),
		filepath.Join(StagingProwBuildclusterConfigRoot, cluster),
		filepath.Join(StagingProwBuildclusterConfigRoot, boskos),
	}
	ProdTestgridConfigPath = filepath.Join(ProdProwConfigRoot, "testgrid")

	// Config paths that need to be gated and tested by prow-config-updater.
	ProdProwKeyConfigPaths = []string{
		filepath.Join(ProdProwConfigRoot, cluster),
		filepath.Join(ProdProwBuildclusterConfigRoot, cluster),
		ProdProwConfigTemplatesPath,
	}
	StagingProwKeyConfigPaths = []string{
		filepath.Join(StagingProwConfigRoot, cluster),
		filepath.Join(StagingProwBuildclusterConfigRoot, cluster),
		StagingProwConfigTemplatesPath,
	}
)

Functions

func CollectRelevantConfigFiles

func CollectRelevantConfigFiles(files []string, paths []string) []string

CollectRelevantConfigFiles can filter out all config files that are under the given paths.

func GenerateConfigFiles

func GenerateConfigFiles() error

GenerateConfigFiles will run the config generator command to generate new Prow config files.

func UpdateProw

func UpdateProw(env ProwEnv, dryrun bool) error

UpdateProw will update Prow with the existing Prow config files.

func UpdateTestgrid

func UpdateTestgrid(env ProwEnv, dryrun bool) error

UpdateTestgrid will update testgrid with the existing testgrid config file.

Types

type ProwEnv

type ProwEnv string

Jump to

Keyboard shortcuts

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