Documentation
¶
Index ¶
- Variables
- func CommandForDeploy(w *Workspace) (namespace, data string)
- func GetFeatAndEnv(commitRef string) (feat string, env string)
- func GetShortSha() string
- func MustMarshalToEnvs(envs map[string]string, v interface{}, prefix string)
- func MustWriteYAML(filename string, v interface{})
- func ResolveEnvVars(envVars map[string]string, data []byte) []byte
- func SetEnviron(envs map[string]string)
- type Context
- type DeployOpt
- type DeployResource
- type EnvVarSet
- type Project
- type Refer
- type Refers
- type Template
- type Workspace
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EnvVarKeyCommitSha = "CI_COMMIT_SHA" EnvVarKeyCommitRefName = "CI_COMMIT_REF_NAME" EnvVarKeyProjectNamespace = "CI_PROJECT_NAMESPACE" EnvVarKeyProjectName = "CI_PROJECT_NAME" EnvVarKeyCommitMessage = "CI_COMMIT_MESSAGE" )
Functions ¶
func CommandForDeploy ¶
func GetFeatAndEnv ¶
func GetShortSha ¶
func GetShortSha() string
func MustMarshalToEnvs ¶
func MustWriteYAML ¶
func MustWriteYAML(filename string, v interface{})
func SetEnviron ¶
Types ¶
type Context ¶
type DeployResource ¶
type Project ¶
type Project struct { Name string `env:"name" json:"name"` Feature string `env:"feature" json:"feature,omitempty"` Version semver.Version `env:"version" json:"version"` Group string `env:"group" json:"group,omitempty"` Description string `env:"description" yaml:"description,omitempty" json:"description,omitempty"` Image string `env:"image" json:"image"` }
func (Project) DefaultImageTag ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func MustNewTemplate ¶
func NewTemplate ¶
type Workspace ¶
type Workspace struct { IsMain bool `json:"-"` ProjectRoot string `json:"-"` WorkspaceRoot string `json:"-"` Project `json:"project"` EnvVarSet EnvVarSet `json:"envVars,omitempty"` DeployEnv string `json:"deployEnv"` DeployResources []DeployResource `json:"deployResources,omitempty"` spec.Spec DefaultEnvs map[string]string Environment string Version string Templates map[string][]byte ReferFiles Refers CommitShaMessage string CommitSha string }
func NewWorkspace ¶
func (*Workspace) InitProject ¶
func (w *Workspace) InitProject()
Click to show internal directories.
Click to hide internal directories.