Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateFakeVolume(namespace string, mountPath string, volumeID *string) apistructs.MetadataField
- func GenerateLocalVolume(namespace string, volumeID *string) apistructs.MetadataField
- func GenerateTaskCommonBinds(mountPoint string) []apistructs.Bind
- func GenerateTaskDiceFileVolume(fileName, fileUUID, fileContainerPath string) apistructs.MetadataField
- func GenerateTaskVolume(task spec.PipelineTask, namespace string, volumeID *string) apistructs.MetadataField
- func GetAvailableTaskContainerPaths(tasks []spec.PipelineTask, currentTask spec.PipelineTask) map[string]string
- func GetAvailableTaskContainerWorkdirs(tasks []spec.PipelineTask, currentTask spec.PipelineTask) map[string]string
- func GetAvailableTaskOutStorages(tasks []spec.PipelineTask) []apistructs.MetadataField
- func HandleTaskCacheVolumes(p *spec.Pipeline, task *spec.PipelineTask, diceYmlJob *diceyml.Job, ...)
- func Initialize(client *dbclient.Client)
- func MakeMesosFetcherURI4AliyunRegistrySecret(mountPoint string) string
- func MakeTaskContainerDiceFilesPath(fileName string) string
- func MakeTaskContainerMetafilePath(taskName string) string
- func MakeTaskContainerVolumeMountDir(taskName string) string
- func MakeTaskContainerWorkdir(taskName string) string
- func ParseDiceYmlJobBinds(diceYmlJob *diceyml.Job) ([]apistructs.Bind, error)
Constants ¶
View Source
const ( TaskCacheHashName = "action_cache_hash_name" TaskCachePath = "action_cache_path" TaskCacheMame = "action_cache" TaskCacheBasePath = "/actions/caches" TaskCacheCompressionSuffix = ".tar" TaskCachePathBasePath = "{{basePath}}" TaskCachePathEndPath = "{{endPath}}" )
View Source
const ( VoLabelKeyContainerPath = "containerPath" VoLabelKeyContextPath = "contextPath" VoLabelKeyStageOrder = "stageOrder" VoLabelKeyVolumeID = "ID" VoLabelKeyDiceFileUUID = "diceFileUUID" )
View Source
const (
EnvKeyMesosFetcherURI = "MESOS_FETCHER_URI"
)
Variables ¶
View Source
var ( ContainerRootDir = "/.pipeline/container" ContainerContextDir = filepath.Join(ContainerRootDir, "context") ContainerMetadataDir = filepath.Join(ContainerRootDir, "metadata") ContainerUploadDir = filepath.Join(ContainerRootDir, "uploaddir") ContainerVolumeMountRootDir = "/.pipeline/context" // task volume 的挂载目录的父目录 ContainerDiceFilesDir = "/.pipeline/container/cms/dice_files" // cms dice files 类型在运行时的挂载目录 )
Functions ¶
func GenerateFakeVolume ¶
func GenerateFakeVolume(namespace string, mountPath string, volumeID *string) apistructs.MetadataField
func GenerateLocalVolume ¶
func GenerateLocalVolume(namespace string, volumeID *string) apistructs.MetadataField
func GenerateTaskCommonBinds ¶
func GenerateTaskCommonBinds(mountPoint string) []apistructs.Bind
GenerateTaskCommonBinds 生成 task 通用 binds
func GenerateTaskDiceFileVolume ¶
func GenerateTaskDiceFileVolume(fileName, fileUUID, fileContainerPath string) apistructs.MetadataField
func GenerateTaskVolume ¶
func GenerateTaskVolume(task spec.PipelineTask, namespace string, volumeID *string) apistructs.MetadataField
func GetAvailableTaskContainerPaths ¶
func GetAvailableTaskContainerPaths(tasks []spec.PipelineTask, currentTask spec.PipelineTask) map[string]string
func GetAvailableTaskContainerWorkdirs ¶
func GetAvailableTaskContainerWorkdirs(tasks []spec.PipelineTask, currentTask spec.PipelineTask) map[string]string
GetAvailableTaskContainerWorkdirs 查询当前存在的所有 Workdir
func GetAvailableTaskOutStorages ¶
func GetAvailableTaskOutStorages(tasks []spec.PipelineTask) []apistructs.MetadataField
func HandleTaskCacheVolumes ¶
func Initialize ¶
func MakeMesosFetcherURI4AliyunRegistrySecret ¶
MakeMesosFetcherURI4AliyunRegistrySecret 生成 DC/OS mesos 下的 fetcherURI,相当于 k8s secret for aliyun docker registry
func MakeTaskContainerDiceFilesPath ¶
MakeTaskContainerDiceFilesPath 生成 task 在容器内的文件配置路径
func MakeTaskContainerMetafilePath ¶
MakeTaskContainerMetafilePath 生成 task 在容器内的 metadata 目录
func MakeTaskContainerVolumeMountDir ¶
MakeTaskContainerVolumeMountDir 生成 task 在容器内的 volume 挂载点
func MakeTaskContainerWorkdir ¶
MakeTaskContainerWorkdir 生成 task 在容器内的 workdir 目录
func ParseDiceYmlJobBinds ¶
func ParseDiceYmlJobBinds(diceYmlJob *diceyml.Job) ([]apistructs.Bind, error)
ParseDiceYmlJobBinds 将 diceYmlJob 里老格式的 binds 转换为新的格式
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.