types

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const IstioLabelKeyInjection = "istio-injection"
View Source
const IstioLabelValueInjection = "enabled"
View Source
const Zadig = "zadig"
View Source
const ZadigDomain = "zadig.koderover.com"

Variables

View Source
var ZadigLabelKeyGlobalOwner = fmt.Sprintf("%s/owner", ZadigDomain)

Functions

This section is empty.

Types

type Cache added in v1.9.9

type Cache struct {
	MediumType       MediumType       `json:"medium_type"       bson:"medium_type"`
	ObjectProperties ObjectProperties `json:"object_properties" bson:"object_properties"`
	NFSProperties    NFSProperties    `json:"nfs_properties"    bson:"nfs_properties"`
}

type CacheDirType added in v1.9.9

type CacheDirType string
const (
	WorkspaceCacheDir   CacheDirType = "workspace"
	UserDefinedCacheDir CacheDirType = "user_defined"
)

type CronTag added in v1.9.9

type CronTag string
const (
	CleanDockerTag CronTag = "CleanDockerTag"
)

type EnvType added in v1.9.9

type EnvType string
const (
	GeneralEnv EnvType = "general"
	ShareEnv   EnvType = "share"
)

type FileInfo

type FileInfo struct {
	// parent path of the file
	Parent string `json:"parent"`
	// base name of the file
	Name string `json:"name"`
	// length in bytes for regular files; system-dependent for others
	Size int64 `json:"size"`
	// file mode bits
	Mode os.FileMode `json:"mode"`
	// modification time
	ModTime int64 `json:"mod_time"`
	// abbreviation for Mode().IsDir()
	IsDir bool `json:"is_dir"`
}

FileInfo ...

type JenkinsBuildParam added in v1.9.9

type JenkinsBuildParam struct {
	Name         string           `bson:"name,omitempty"                json:"name,omitempty"`
	Value        interface{}      `bson:"value,omitempty"               json:"value,omitempty"`
	Type         JenkinsParamType `bson:"type,omitempty"                json:"type,omitempty"`
	AutoGenerate bool             `bson:"auto_generate,omitempty"       json:"auto_generate,omitempty"`
	ChoiceOption []string         `bson:"choice_option,omitempty"       json:"choice_option,omitempty"`
}

type JenkinsParamType added in v1.9.9

type JenkinsParamType string
const (
	Str    JenkinsParamType = "string"
	Choice JenkinsParamType = "choice"
)

type JobStatus added in v1.9.9

type JobStatus string
const (
	JobSuccess JobStatus = "success"
	JobFail    JobStatus = "fail"
)

type MediumType added in v1.9.9

type MediumType string
const (
	ObjectMedium MediumType = "object"
	NFSMedium    MediumType = "nfs"
)

type NFSProperties added in v1.9.9

type NFSProperties struct {
	ProvisionType    ProvisionType `json:"provision_type"      bson:"provision_type"`
	StorageClass     string        `json:"storage_class"       bson:"storage_class"`
	StorageSizeInGiB int64         `json:"storage_size_in_gib" bson:"storage_size_in_gib"`
	PVC              string        `json:"pvc"                 bson:"pvc"`
	Subpath          string        `json:"subpath"             bson:"subpath"`
}

type ObjectProperties added in v1.9.9

type ObjectProperties struct {
	ID string `json:"id" bson:"id"`
}

Note: In the current design, when the object storage is used as the cache medium, the default object storage will be used as the cache medium, but in the near future users may be allowed to select different object storage as the cache medium according to the cluster. So it is temporarily reserved in `v1.10.0`, but do not use.

type ObjectStorageInfo added in v1.9.9

type ObjectStorageInfo struct {
	Endpoint string `bson:"endpoint" json:"endpoint" yaml:"endpoint"`
	AK       string `bson:"AK"       json:"AK"       yaml:"AK"`
	SK       string `bson:"SK"       json:"SK"       yaml:"SK"`
	Bucket   string `bson:"bucket"   json:"bucket"   yaml:"bucket"`
	Insecure bool   `bson:"insecure" json:"insecure" yaml:"insecure"`
	Provider int8   `bson:"provider" json:"provider" yaml:"provider"`
}

type ObjectStoragePathDetail added in v1.9.9

type ObjectStoragePathDetail struct {
	FilePath        string `bson:"file_path" json:"file_path" yaml:"file_path"`
	DestinationPath string `bson:"dest_path" json:"dest_path" yaml:"dest_path"`
}

type ProvisionType added in v1.9.9

type ProvisionType string
const (
	DynamicProvision ProvisionType = "dynamic"
	StaticProvision  ProvisionType = "static"
)

type ReaperType added in v1.9.9

type ReaperType string
const (
	BuildReaperType ReaperType = "Build"
	TestReaperType  ReaperType = "Test"
)

type Repository

type Repository struct {
	// Source is github, gitlab
	Source        string `bson:"source,omitempty"          json:"source,omitempty"`
	RepoOwner     string `bson:"repo_owner"                json:"repo_owner"`
	RepoName      string `bson:"repo_name"                 json:"repo_name"`
	RemoteName    string `bson:"remote_name,omitempty"     json:"remote_name,omitempty"`
	Branch        string `bson:"branch"                    json:"branch"`
	PR            int    `bson:"pr,omitempty"              json:"pr,omitempty"`
	Tag           string `bson:"tag,omitempty"             json:"tag,omitempty"`
	CommitID      string `bson:"commit_id,omitempty"       json:"commit_id,omitempty"`
	CommitMessage string `bson:"commit_message,omitempty"  json:"commit_message,omitempty"`
	CheckoutPath  string `bson:"checkout_path,omitempty"   json:"checkout_path,omitempty"`
	SubModules    bool   `bson:"submodules,omitempty"      json:"submodules,omitempty"`
	// UseDefault defines if the repo can be configured in start pipeline task page
	UseDefault bool `bson:"use_default,omitempty"          json:"use_default,omitempty"`
	// IsPrimary used to generated image and package name, each build has one primary repo
	IsPrimary  bool `bson:"is_primary"                     json:"is_primary"`
	CodehostID int  `bson:"codehost_id"                    json:"codehost_id"`
	// add
	OauthToken  string `bson:"oauth_token"                  json:"oauth_token"`
	Address     string `bson:"address"                      json:"address"`
	AuthorName  string `bson:"author_name,omitempty"        json:"author_name,omitempty"`
	CheckoutRef string `bson:"checkout_ref,omitempty"       json:"checkout_ref,omitempty"`
	// codehub
	ProjectUUID string `bson:"project_uuid,omitempty"       json:"project_uuid,omitempty"`
	RepoUUID    string `bson:"repo_uuid,omitempty"          json:"repo_uuid,omitempty"`
	RepoID      string `bson:"repo_id,omitempty"            json:"repo_id,omitempty"`
	Username    string `bson:"username,omitempty"           json:"username,omitempty"`
	Password    string `bson:"password,omitempty"           json:"password,omitempty"`
	// Now EnableProxy is not something we store. We decide this on runtime
	EnableProxy bool `bson:"-"       json:"enable_proxy,omitempty"`
}

Repository struct

func (*Repository) GetReleaseCandidateTag

func (repo *Repository) GetReleaseCandidateTag(taskID int64) string

GetReleaseCandidateTag 返回待发布对象Tag Branch: 20060102150405-{TaskID}-master PR: 20060102150405-{TaskID}-pr-1765 Branch + PR: 20060102150405-{TaskID}-master-pr-1276 Tag: 20060102150405-{TaskID}-v0.9.1

Jump to

Keyboard shortcuts

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