common

package
v1.0.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdEnvAnno string = "environment"

	WerfHome                                   Env = "WERF_HOME"
	WerfTmp                                    Env = "WERF_TMP"
	WerfAnsibleArgs                            Env = "WERF_ANSIBLE_ARGS"
	WerfDockerConfig                           Env = "WERF_DOCKER_CONFIG"
	WerfIgnoreCIDockerAutologin                Env = "WERF_IGNORE_CI_DOCKER_AUTOLOGIN"
	WerfInsecureRegistry                       Env = "WERF_INSECURE_REGISTRY"
	WerfSecretKey                              Env = "WERF_SECRET_KEY"
	WerfCleanupRegistryPassword                Env = "WERF_CLEANUP_REGISTRY_PASSWORD"
	WerfDisableSyncLocalStagesDatePeriodPolicy Env = "WERF_DISABLE_SYNC_LOCAL_STAGES_DATE_PERIOD_POLICY"
	WerfGitTagsExpiryDatePeriodPolicy          Env = "WERF_GIT_TAGS_EXPIRY_DATE_PERIOD_POLICY"
	WerfGitTagsLimitPolicy                     Env = "WERF_GIT_TAGS_LIMIT_POLICY"
	WerfGitCommitsExpiryDatePeriodPolicy       Env = "WERF_GIT_COMMITS_EXPIRY_DATE_PERIOD_POLICY"
	WerfGitCommitsLimitPolicy                  Env = "WERF_GIT_COMMITS_LIMIT_POLICY"
)

Variables

This section is empty.

Functions

func EnvsDescription

func EnvsDescription(envs ...Env) string

func GetDeployTag

func GetDeployTag(cmdData *CmdData, projectDir string) (string, error)

func GetHelmRelease

func GetHelmRelease(releaseOption string, environmentOption string, werfConfig *config.WerfConfig) (string, error)

func GetKubernetesNamespace

func GetKubernetesNamespace(namespaceOption string, environmentOption string, werfConfig *config.WerfConfig) (string, error)

func GetLongCommandDescription

func GetLongCommandDescription(text string) string

func GetNamespace

func GetNamespace(namespaceOption string) string

func GetOptionalRepoName

func GetOptionalRepoName(projectName, repoOption string) string

func GetProjectBuildDir

func GetProjectBuildDir(projectName string) (string, error)

func GetProjectDir

func GetProjectDir(cmdData *CmdData) (string, error)

func GetRequiredRepoName

func GetRequiredRepoName(projectName, repoOption string) (string, error)

func GetTagOptions

func GetTagOptions(cmdData *CmdData, projectDir string) (build.TagOptions, error)

func GetWerfConfig

func GetWerfConfig(projectDir string) (*config.WerfConfig, error)

func LogRunningTime

func LogRunningTime(f func() error) error

func SetupDir

func SetupDir(cmdData *CmdData, cmd *cobra.Command)

func SetupEnvironment

func SetupEnvironment(cmdData *CmdData, cmd *cobra.Command)

func SetupHomeDir

func SetupHomeDir(cmdData *CmdData, cmd *cobra.Command)

func SetupKubeContext

func SetupKubeContext(cmdData *CmdData, cmd *cobra.Command)

func SetupNamespace

func SetupNamespace(cmdData *CmdData, cmd *cobra.Command)

func SetupRelease

func SetupRelease(cmdData *CmdData, cmd *cobra.Command)

func SetupSSHKey

func SetupSSHKey(cmdData *CmdData, cmd *cobra.Command)

func SetupTag

func SetupTag(cmdData *CmdData, cmd *cobra.Command)

func SetupTmpDir

func SetupTmpDir(cmdData *CmdData, cmd *cobra.Command)

Types

type CmdData

type CmdData struct {
	Dir     *string
	TmpDir  *string
	HomeDir *string
	SSHKeys *[]string

	Tag        *[]string
	TagBranch  *bool
	TagBuildID *bool
	TagCI      *bool
	TagCommit  *bool

	Environment *string
	Release     *string
	Namespace   *string
	KubeContext *string
}

type Env

type Env string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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