Versions in this module Expand all Collapse all v2 v2.0.2 Jan 16, 2024 Changes in this version + const EnvKeyCIBranch + const EnvKeyCICommitSHA + const EnvKeyDeploymentUID + const EnvKeyDockerRegistryKey + const EnvKeyProjectFeature + const EnvKeyProjectGroup + const EnvKeyProjectName + const EnvKeyProjectNamespace + const EnvKeyProjectOwner + const EnvKeyProjectSelector + const EnvKeyProjectVersion + const STAGE_BUILD + const STAGE_DEPLOY + const STAGE_SHIP + const STAGE_TEST + var DefaultCICache = CICache + var DefaultConfigFile = "project.yml" + var DockerRegistry string + var DockerfileYmlOrders = []string + var PresetWorkflows = Workflows + var RegisteredBuilders = Builders + var VersionRegexp = regexp.MustCompile(`(\d+)\.(\d+)\.(\d+)`) + func CommandsForShipping(p *Project, push bool) (commands []*exec.Cmd) + func GetBranchName() string + func GetEnvName() string + func GetFeatureName() string + func GetPreName() string + func GetReleaseName() string + func GetSha() string + func LoadEnv(envName string, feature string) map[string]string + func ProcessDeployment(p *Project, env, deployConfig, serviceConfig string) error + func RegisterBuilder(name string, builder *Builder) + func RegisterWorkFlow(name string, flow *Workflow) + func SetEnv(k string, v string) + func WrapEnv(s string) string + type AliyunLoginResponse struct + Data AliyunLoginResponseData + type AliyunLoginResponseData struct + AuthorizationToken string + ExpireDate uint64 + TempUserName string + type AliyunShippingProcessor struct + func (a *AliyunShippingProcessor) Login(p *Project) []*exec.Cmd + func (a *AliyunShippingProcessor) Push(p *Project, image string) []*exec.Cmd + type BranchFlow struct + Env map[string]string + Extends string + Jobs Jobs + Skip bool + func (branchFlow *BranchFlow) UnmarshalYAML(unmarshal func(interface{}) error) error + func (branchFlow BranchFlow) Merge(nextBranchFlow *BranchFlow) BranchFlow + type BranchFlows map[string]BranchFlow + func (branchFlows BranchFlows) Merge(nextBranches BranchFlows) BranchFlows + type Builder struct + BuildScript []string + Image string + ProgramLanguage string + TestScript []string + WorkingDir string + type Builders map[string]*Builder + func (bs Builders) GetBuilderBy(programLanguage string) *Builder + func (bs Builders) SupportProgramLanguages() (list []string) + type CIArtifact struct + ExpireIn string + Name string + Paths []string + UnTracked bool + When string + type CICache struct + Key string + Paths []string + UnTracked bool + type CIConfig struct + Cache CICache + CommonJob CIJob + Stages []string + func NewCIConfig() *CIConfig + func (c *CIConfig) AddJob(name string, job *CIJob) *CIConfig + func (c *CIConfig) AddJobWithDependencies(name string, job *CIJob, dependencies ...string) *CIConfig + func (c *CIConfig) String() string + func (c *CIConfig) WithCache(cache CICache) *CIConfig + func (c *CIConfig) WithCommon(job *CIJob) *CIConfig + func (c *CIConfig) WithStages(stages ...string) *CIConfig + type CIEnv struct + Name string + type CIJob struct + AfterScript []string + AllowFailure bool + Artifacts *CIArtifact + BeforeScript []string + Coverage string + Dependencies []string + Environment CIEnv + Except []string + Image string + Only []string + Script []string + Services []string + Stage string + Tags []string + Variables map[string]string + When string + func NewCIJob(stage string) *CIJob + func (c CIJob) AllowFail() *CIJob + func (c CIJob) WithArtifacts(artifact *CIArtifact) *CIJob + func (c CIJob) WithDependencies(dependencies ...string) *CIJob + func (c CIJob) WithEnv(name string) *CIJob + func (c CIJob) WithExcept(except ...string) *CIJob + func (c CIJob) WithImage(image string) *CIJob + func (c CIJob) WithOnly(only ...string) *CIJob + func (c CIJob) WithScript(script ...string) *CIJob + func (c CIJob) WithTags(tags ...string) *CIJob + func (c CIJob) WithVariable(key string, value string) CIJob + func (c CIJob) WithWhen(when string) *CIJob + type CIJobMap map[string]*CIJob + type DefaultShippingProcessor struct + func (h *DefaultShippingProcessor) Login(p *Project) []*exec.Cmd + func (h *DefaultShippingProcessor) Push(p *Project, image string) []*exec.Cmd + type FullImage string + func (i FullImage) String() string + type Job struct + Artifacts *CIArtifact + Builder string + Run Script + Skip bool + Stage string + func (job *Job) UnmarshalYAML(unmarshal func(interface{}) error) error + func (job Job) MarshalYAML() (interface{}, error) + func (job Job) Merge(nextJob *Job) Job + type Jobs []Job + func (jobs Jobs) Find(stage string) (int, *Job) + func (jobs Jobs) Merge(nextJobs Jobs) Jobs + func (jobs Jobs) Remove(index int) (Jobs, error) + type Project struct + Desc string + Feature string + Group string + Name string + Namespace string + Owner string + ProgramLanguage string + Scripts map[string]Script + Selector string + Version Version + Workflow Workflow + func (p *Project) Command(args ...string) *exec.Cmd + func (p *Project) Execute(args ...string) + func (p *Project) Run(commands ...*exec.Cmd) + func (p *Project) RunScript(key string, inDocker bool) error + func (p *Project) SetEnviron() + func (p *Project) String() string + func (p *Project) UnmarshalFromFile(filePath, fileName string) error + func (p *Project) WriteToFile(filePath, fileName string) + func (p Project) WithDesc(desc string) Project + func (p Project) WithFeature(f string) Project + func (p Project) WithGroup(group string) Project + func (p Project) WithLanguage(pl string) Project + func (p Project) WithName(name string) Project + func (p Project) WithNamespace(namespace string) Project + func (p Project) WithOwner(owner string) Project + func (p Project) WithScripts(key string, scripts ...string) Project + func (p Project) WithVersion(s string) Project + func (p Project) WithWorkflow(workflow string) Project + type Script []string + func (s *Script) UnmarshalYAML(unmarshal func(interface{}) error) error + func (s Script) IsZero() bool + func (s Script) MarshalYAML() (interface{}, error) + func (s Script) String() string + type ShippingProcessor interface + Login func(p *Project) []*exec.Cmd + Push func(p *Project, image string) []*exec.Cmd + func NewShippingProcessor(typ enum.ShippingProcessorType) ShippingProcessor + type Version struct + Latest bool + Major int + Minor int + Patch int + Prefix string + Suffix string + func FromVersionString(s string) (*Version, error) + func (v *Version) UnmarshalYAML(unmarshal func(interface{}) error) error + func (v Version) IncreaseMajor() Version + func (v Version) IncreaseMinor() Version + func (v Version) IncreasePatch() Version + func (v Version) IsStable() bool + func (v Version) MarshalYAML() (interface{}, error) + func (v Version) String() string + type Workflow struct + BranchFlows BranchFlows + Extends string + func (w *Workflow) ToCIConfig(project *Project) *CIConfig + func (w *Workflow) ToDroneConfig(p *Project) *drone.CIDronePipelineDocker + func (w Workflow) GetAvailableEnv() (envs map[string]string) + func (w Workflow) TryExtendsOrSetDefaults() *Workflow + type Workflows map[string]*Workflow + func (bs Workflows) List() (list []string) Other modules containing this package gitee.com/eden-framework/eden-framework