common

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DerrickHome    = ".derrick"
	DerrickHomeEnv = "DERRICK_HOME"

	DerrickConf = "derrick.conf"
)
View Source
const (
	Meta                 = "Meta"
	Dockerfile           = "Dockerfile"
	DockerCompose        = "DockerCompose"
	KubernetesDeployment = "kubernetes-deployment.yaml"
)
View Source
const (
	ImageWithTag   string = "ImageWithTag"
	Version        string = "Version"
	ProjectFolder  string = "ProjectFolder"
	DerrickVersion string = "DerrickVersion"
	ProjectName    string = "ProjectName"
)

Variables

This section is empty.

Functions

func CheckDerrickFirstSetup

func CheckDerrickFirstSetup() (bool, error)

CheckDerrickFirstSetup checks if derrick is used for the first time

func CheckDerrickInitStep

func CheckDerrickInitStep(workspace string) bool

func CheckDockerFileExisted

func CheckDockerFileExisted(workspace string) bool

func GetCommandsHome

func GetCommandsHome() (string, error)

func GetDerrickHome

func GetDerrickHome() (string, error)

GetDerrickHome return vela home dir

func GetRiggingHome

func GetRiggingHome() (string, error)

func InitCommandsDir

func InitCommandsDir() error

func InitDerrickDir

func InitDerrickDir() error

func InitDirs

func InitDirs() error

InitDirs create dir if not exits

func InitRiggingDir

func InitRiggingDir() error

func RealtimePrintCommandOutput

func RealtimePrintCommandOutput(cmd *exec.Cmd, logFile string) error

RealtimePrintCommandOutput prints command output in real time If logFile is "", it will prints the stdout, or it will write to local file

Types

type AutoParam

type AutoParam interface {
	Execute() (map[string]string, error)
	Name() string
}

type ParamReport

type ParamReport struct {
	Name  string
	Nodes map[string]ParamReport
	Store map[string]string
}

func (*ParamReport) GenerateReport

func (dr *ParamReport) GenerateReport() map[string]string

func (*ParamReport) RegisterAutoParam

func (dr *ParamReport) RegisterAutoParam(d AutoParam, nodeName string) error

type TemplateRenderContext

type TemplateRenderContext struct {
	ImageWithTag   string
	Version        string
	ProjectFolder  string
	DerrickVersion string
	ProjectName    string
}

func GetBuildContext

func GetBuildContext(workspace string) (*TemplateRenderContext, error)

Jump to

Keyboard shortcuts

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