Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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 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"`
}
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 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
Click to show internal directories.
Click to hide internal directories.