settings

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ApplicationNameKey = "application-name"
	HubURLKey          = "hub-url"
	HubCatalogNameKey  = "hub-catalog-name"
	//nolint: gosec
	MaxKeepRunUpperLimitKey               = "max-keep-run-upper-limit"
	DefaultMaxKeepRunsKey                 = "default-max-keep-runs"
	RemoteTasksKey                        = "remote-tasks"
	BitbucketCloudCheckSourceIPKey        = "bitbucket-cloud-check-source-ip"
	BitbucketCloudAdditionalSourceIPKey   = "bitbucket-cloud-additional-source-ip"
	TektonDashboardURLKey                 = "tekton-dashboard-url"
	AutoConfigureNewGitHubRepoKey         = "auto-configure-new-github-repo"
	AutoConfigureRepoNamespaceTemplateKey = "auto-configure-repo-namespace-template"

	CustomConsoleNameKey         = "custom-console-name"
	CustomConsoleURLKey          = "custom-console-url"
	CustomConsolePRDetailKey     = "custom-console-url-pr-details"
	CustomConsolePRTaskLogKey    = "custom-console-url-pr-tasklog"
	CustomConsoleNamespaceURLKey = "custom-console-url-namespace"

	SecretAutoCreateKey = "secret-auto-create"

	SecretGhAppTokenRepoScopedKey = "secret-github-app-token-scoped" //nolint: gosec

	SecretGhAppTokenScopedExtraReposKey = "secret-github-app-scope-extra-repos" //nolint: gosec

	PACApplicationNameDefaultValue         = "Pipelines as Code CI"
	HubURLDefaultValue                     = "https://api.hub.tekton.dev/v1"
	HubCatalogNameDefaultValue             = "tekton"
	AutoConfigureNewGitHubRepoDefaultValue = "false"

	ErrorLogSnippetKey = "error-log-snippet"

	ErrorDetectionKey = "error-detection-from-container-logs"

	ErrorDetectionNumberOfLinesKey = "error-detection-max-number-of-lines"

	ErrorDetectionSimpleRegexpKey = "error-detection-simple-regexp"

	RememberOKToTestKey = "remember-ok-to-test"
)

Variables

View Source
var (
	TknBinaryName = `tkn`
	TknBinaryURL  = `https://tekton.dev/docs/cli/#installation`
)

Functions

func ConfigToSettings

func ConfigToSettings(logger *zap.SugaredLogger, setting *Settings, config map[string]string) error

func SetDefaults

func SetDefaults(config map[string]string)

func StringToBool

func StringToBool(s string) bool

func Validate

func Validate(config map[string]string) error

Types

type HubCatalog added in v0.20.0

type HubCatalog struct {
	ID   string
	Name string
	URL  string
}

type Settings

type Settings struct {
	ApplicationName                    string
	HubCatalogs                        *sync.Map
	RemoteTasks                        bool
	MaxKeepRunsUpperLimit              int
	DefaultMaxKeepRuns                 int
	BitbucketCloudCheckSourceIP        bool
	BitbucketCloudAdditionalSourceIP   string
	TektonDashboardURL                 string
	AutoConfigureNewGitHubRepo         bool
	AutoConfigureRepoNamespaceTemplate string

	SecretAutoCreation               bool
	SecretGHAppRepoScoped            bool
	SecretGhAppTokenScopedExtraRepos string

	ErrorLogSnippet             bool
	ErrorDetection              bool
	ErrorDetectionNumberOfLines int
	ErrorDetectionSimpleRegexp  string

	CustomConsoleName         string
	CustomConsoleURL          string
	CustomConsolePRdetail     string
	CustomConsolePRTaskLog    string
	CustomConsoleNamespaceURL string

	RememberOKToTest bool
}

func (*Settings) DeepCopy added in v0.23.0

func (s *Settings) DeepCopy(out *Settings)

Jump to

Keyboard shortcuts

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