Documentation ¶
Index ¶
- func AddDeliveryVersion(orgID, taskID int, productName, workflowName string, ...) error
- func CancelTask(userName, pipelineName string, taskID int64, typeString config.PipelineType, ...) error
- func CancelTaskV2(userName, pipelineName string, taskID int64, typeString config.PipelineType, ...) error
- func CreateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error
- func CreateRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func Delete(name, productName string, log *zap.SugaredLogger) error
- func DeleteClusterResourceAsync(selector labels.Selector, kubeClient client.Client, log *zap.SugaredLogger) error
- func DeleteDeliveryInfos(productName string, log *zap.SugaredLogger) error
- func DeletePipeline(pipelineName, requestID string, isDeletingProductTmpl bool, ...) error
- func DeletePipelines(productName, requestID string, log *zap.SugaredLogger) error
- func DeleteProduct(username, envName, productName, requestID string, log *zap.SugaredLogger) (err error)
- func DeleteRenderSet(productName string, log *zap.SugaredLogger) error
- func DeleteResourcesAsync(namespace string, selector labels.Selector, kubeClient client.Client, ...) error
- func DeleteTestModule(name, productName, requestID string, log *zap.SugaredLogger) error
- func DeleteWorkflow(workflowName, requestID string, isDeletingProductTmpl bool, ...) error
- func DeleteWorkflows(productName, requestID string, log *zap.SugaredLogger) error
- func DownloadService(base, serviceName string) error
- func EnsureDefaultRegistrySecret(namespace string, kubeClient client.Client, log *zap.SugaredLogger) error
- func EnsureResp(build *commonmodels.Build)
- func EnsureSecretEnvs(existedKVs []*commonmodels.KeyVal, newKVs []*commonmodels.KeyVal)
- func FillProductTemplateValuesYamls(tmpl *templatemodels.Product, log *zap.SugaredLogger) error
- func FillProductTemplateVars(productTemplates []*template.Product, log *zap.SugaredLogger) error
- func FindDefaultRegistry(log *zap.SugaredLogger) (*models.RegistryNamespace, error)
- func GetConfigPayload() *models.ConfigPayload
- func GetConfigTemplateByService(serviceName string, log *zap.SugaredLogger) (*models.Config, error)
- func GetDeliveryVersion(args *repo.DeliveryVersionArgs, log *zap.SugaredLogger) (*commonmodels.DeliveryVersion, error)
- func GetFeatures(log *zap.SugaredLogger) (string, error)
- func GetGitlabAddress(URL string) (string, error)
- func GetLocalTestSuite(pipelineName, serviceName, testType string, taskID int64, testName string, ...) (*commonmodels.TestReport, error)
- func GetOwnerRepoBranchPath(URL string) (string, string, string, string, string, string, error)
- func GetPipelineInfo(userID int, pipelineName string, log *zap.SugaredLogger) (*commonmodels.Pipeline, error)
- func GetProductEnvNamespace(envName, productName string) string
- func GetProductTemplate(productName string, log *zap.SugaredLogger) (*template.Product, error)
- func GetRenderSet(renderName string, revision int64, log *zap.SugaredLogger) (*commonmodels.RenderSet, error)
- func GetRenderSetInfo(renderName string, revision int64) (*commonmodels.RenderSet, error)
- func GetServiceTasks(log *zap.SugaredLogger) (map[string][]string, error)
- func GetServiceTemplate(serviceName, serviceType, productName, excludeStatus string, revision int64, ...) (*commonmodels.Service, error)
- func GetSubTaskContent(deliveryVersion *commonmodels.DeliveryVersion, pipelineTask *taskmodels.Task, ...)
- func InsertDeliveryTest(args *commonmodels.DeliveryTest, log *zap.SugaredLogger) error
- func InsertDeliveryVersion(args *commonmodels.DeliveryVersion, log *zap.SugaredLogger) error
- func InsertOperation(args *models.OperationLog, log *zap.SugaredLogger) error
- func IsAllKeyCovered(arg *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func IsAllKeyCoveredService(serviceName string, arg *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func List(log *zap.SugaredLogger) []*models.Queue
- func ListHelmRepos(log *zap.SugaredLogger) ([]*commonmodels.HelmRepo, error)
- func ListRegistryNamespaces(log *zap.SugaredLogger) ([]*models.RegistryNamespace, error)
- func ListRenderSets(productTmplName string, log *zap.SugaredLogger) ([]*commonmodels.RenderSet, error)
- func ListServicesRenderKeys(services [][]string, log *zap.SugaredLogger) ([]*templatemodels.RenderKV, error)
- func ListTmplRenderKeys(productTmplName string, log *zap.SugaredLogger) ([]*templatemodels.RenderKV, error)
- func LogProductStats(user, event, prodName, requestID string, startTime int64, ...)
- func RelateRender(productName, renderName string, log *zap.SugaredLogger) error
- func Remove(task *models.Queue, log *zap.SugaredLogger) error
- func RemoveCronjob(workflowName string, log *zap.SugaredLogger) error
- func RenderValueForString(origin string, rs *commonmodels.RenderSet) string
- func SendErrorMessage(sender, title, requestID string, err error, log *zap.SugaredLogger)
- func SendFailedTaskMessage(username, productName, name, requestID string, ...)
- func SendMessage(sender, title, content, requestID string, log *zap.SugaredLogger)
- func SetDefaultRenderSet(renderTmplName, productTmplName string, log *zap.SugaredLogger) error
- func SetRenderDataStatus(rs *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func ToArtifactTask(sb map[string]interface{}) (*task.Artifact, error)
- func ToBuildTask(sb map[string]interface{}) (*task.Build, error)
- func ToDeployTask(sb map[string]interface{}) (*task.Deploy, error)
- func ToDistributeToS3Task(sb map[string]interface{}) (*task.DistributeToS3, error)
- func ToDockerBuildTask(sb map[string]interface{}) (*task.DockerBuild, error)
- func ToJenkinsBuildTask(sb map[string]interface{}) (*task.JenkinsBuild, error)
- func ToJiraTask(sb map[string]interface{}) (*task.Jira, error)
- func ToReleaseImageTask(sb map[string]interface{}) (*task.ReleaseImage, error)
- func ToSecurityTask(sb map[string]interface{}) (*task.Security, error)
- func ToTestingTask(sb map[string]interface{}) (*task.Testing, error)
- func UpdateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error
- func UpdateOperation(id string, status int, log *zap.SugaredLogger) error
- func UpdateRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func UpdateSubRenderSet(name string, kvs []*templatemodels.RenderKV, log *zap.SugaredLogger) error
- func ValidateKVs(kvs []*templatemodels.RenderKV, services [][]string, log *zap.SugaredLogger) error
- func ValidateRenderSet(productName, renderName, ServiceName string, log *zap.SugaredLogger) (*commonmodels.RenderSet, error)
- type CronjobPayload
- type Features
- type IngressInfo
- type PipelineResource
- type Preview
- type ServiceProductMap
- type ServiceResp
- type ServiceTmplBuildObject
- type ServiceTmplObject
- type ServiceTmplResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDeliveryVersion ¶
func AddDeliveryVersion(orgID, taskID int, productName, workflowName string, pipelineTask *taskmodels.Task, logger *zap.SugaredLogger) error
func CancelTask ¶
func CancelTask(userName, pipelineName string, taskID int64, typeString config.PipelineType, reqID string, log *zap.SugaredLogger) error
func CancelTaskV2 ¶
func CancelTaskV2(userName, pipelineName string, taskID int64, typeString config.PipelineType, requestID string, log *zap.SugaredLogger) error
func CreateBuild ¶
func CreateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error
func CreateRenderSet ¶
func CreateRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
func DeleteDeliveryInfos ¶
func DeleteDeliveryInfos(productName string, log *zap.SugaredLogger) error
func DeletePipeline ¶
func DeletePipeline(pipelineName, requestID string, isDeletingProductTmpl bool, log *zap.SugaredLogger) error
func DeletePipelines ¶
func DeletePipelines(productName, requestID string, log *zap.SugaredLogger) error
func DeleteProduct ¶
func DeleteProduct(username, envName, productName, requestID string, log *zap.SugaredLogger) (err error)
func DeleteRenderSet ¶
func DeleteRenderSet(productName string, log *zap.SugaredLogger) error
func DeleteResourcesAsync ¶
func DeleteResourcesAsync(namespace string, selector labels.Selector, kubeClient client.Client, log *zap.SugaredLogger) error
根据namespace和selector删除所有资源
func DeleteTestModule ¶
func DeleteTestModule(name, productName, requestID string, log *zap.SugaredLogger) error
func DeleteWorkflow ¶
func DeleteWorkflow(workflowName, requestID string, isDeletingProductTmpl bool, log *zap.SugaredLogger) error
func DeleteWorkflows ¶
func DeleteWorkflows(productName, requestID string, log *zap.SugaredLogger) error
func DownloadService ¶
func EnsureResp ¶
func EnsureResp(build *commonmodels.Build)
func EnsureSecretEnvs ¶
func EnsureSecretEnvs(existedKVs []*commonmodels.KeyVal, newKVs []*commonmodels.KeyVal)
EnsureSecretEnvs 转换敏感信息前端传入的Mask内容为真实内容
func FillProductTemplateValuesYamls ¶
func FillProductTemplateValuesYamls(tmpl *templatemodels.Product, log *zap.SugaredLogger) error
FillProductTemplateValuesYamls 返回renderSet中的renderChart信息
func FillProductTemplateVars ¶
func FillProductTemplateVars(productTemplates []*template.Product, log *zap.SugaredLogger) error
func FindDefaultRegistry ¶
func FindDefaultRegistry(log *zap.SugaredLogger) (*models.RegistryNamespace, error)
func GetConfigPayload ¶
func GetConfigPayload() *models.ConfigPayload
func GetDeliveryVersion ¶
func GetDeliveryVersion(args *repo.DeliveryVersionArgs, log *zap.SugaredLogger) (*commonmodels.DeliveryVersion, error)
func GetFeatures ¶
func GetFeatures(log *zap.SugaredLogger) (string, error)
func GetGitlabAddress ¶
func GetLocalTestSuite ¶
func GetLocalTestSuite(pipelineName, serviceName, testType string, taskID int64, testName string, typeString config.PipelineType, log *zap.SugaredLogger) (*commonmodels.TestReport, error)
func GetOwnerRepoBranchPath ¶
GetOwnerRepoBranchPath 获取gitlab路径中的owner、repo、branch和path
func GetPipelineInfo ¶
func GetPipelineInfo(userID int, pipelineName string, log *zap.SugaredLogger) (*commonmodels.Pipeline, error)
func GetProductEnvNamespace ¶
func GetProductTemplate ¶
func GetRenderSet ¶
func GetRenderSet(renderName string, revision int64, log *zap.SugaredLogger) (*commonmodels.RenderSet, error)
func GetRenderSetInfo ¶
func GetRenderSetInfo(renderName string, revision int64) (*commonmodels.RenderSet, error)
func GetServiceTasks ¶
func GetServiceTasks(log *zap.SugaredLogger) (map[string][]string, error)
func GetServiceTemplate ¶
func GetServiceTemplate(serviceName, serviceType, productName, excludeStatus string, revision int64, log *zap.SugaredLogger) (*commonmodels.Service, error)
func GetSubTaskContent ¶
func GetSubTaskContent(deliveryVersion *commonmodels.DeliveryVersion, pipelineTask *taskmodels.Task, log *zap.SugaredLogger)
TODO: LOU rewrite it
func InsertDeliveryTest ¶
func InsertDeliveryTest(args *commonmodels.DeliveryTest, log *zap.SugaredLogger) error
func InsertDeliveryVersion ¶
func InsertDeliveryVersion(args *commonmodels.DeliveryVersion, log *zap.SugaredLogger) error
func InsertOperation ¶
func InsertOperation(args *models.OperationLog, log *zap.SugaredLogger) error
func IsAllKeyCovered ¶
func IsAllKeyCovered(arg *commonmodels.RenderSet, log *zap.SugaredLogger) error
IsAllKeyCovered 检查是否覆盖所有产品key
func IsAllKeyCoveredService ¶
func IsAllKeyCoveredService(serviceName string, arg *commonmodels.RenderSet, log *zap.SugaredLogger) error
IsAllKeyCoveredService 检查是否覆盖所有服务key
func ListHelmRepos ¶
func ListHelmRepos(log *zap.SugaredLogger) ([]*commonmodels.HelmRepo, error)
func ListRegistryNamespaces ¶
func ListRegistryNamespaces(log *zap.SugaredLogger) ([]*models.RegistryNamespace, error)
func ListRenderSets ¶
func ListRenderSets(productTmplName string, log *zap.SugaredLogger) ([]*commonmodels.RenderSet, error)
func ListServicesRenderKeys ¶
func ListServicesRenderKeys(services [][]string, log *zap.SugaredLogger) ([]*templatemodels.RenderKV, error)
func ListTmplRenderKeys ¶
func ListTmplRenderKeys(productTmplName string, log *zap.SugaredLogger) ([]*templatemodels.RenderKV, error)
func LogProductStats ¶
func LogProductStats(user, event, prodName, requestID string, startTime int64, log *zap.SugaredLogger)
func RelateRender ¶
func RelateRender(productName, renderName string, log *zap.SugaredLogger) error
func RemoveCronjob ¶
func RemoveCronjob(workflowName string, log *zap.SugaredLogger) error
func RenderValueForString ¶
func RenderValueForString(origin string, rs *commonmodels.RenderSet) string
func SendErrorMessage ¶
func SendErrorMessage(sender, title, requestID string, err error, log *zap.SugaredLogger)
func SendFailedTaskMessage ¶
func SendFailedTaskMessage(username, productName, name, requestID string, workflowType config.PipelineType, err error, log *zap.SugaredLogger)
func SendMessage ¶
func SendMessage(sender, title, content, requestID string, log *zap.SugaredLogger)
func SetDefaultRenderSet ¶
func SetDefaultRenderSet(renderTmplName, productTmplName string, log *zap.SugaredLogger) error
func SetRenderDataStatus ¶
func SetRenderDataStatus(rs *commonmodels.RenderSet, log *zap.SugaredLogger) error
func ToDistributeToS3Task ¶
func ToDistributeToS3Task(sb map[string]interface{}) (*task.DistributeToS3, error)
func ToDockerBuildTask ¶
func ToDockerBuildTask(sb map[string]interface{}) (*task.DockerBuild, error)
func ToJenkinsBuildTask ¶
func ToJenkinsBuildTask(sb map[string]interface{}) (*task.JenkinsBuild, error)
ToJenkinsTask ...
func ToReleaseImageTask ¶
func ToReleaseImageTask(sb map[string]interface{}) (*task.ReleaseImage, error)
func UpdateBuild ¶
func UpdateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error
func UpdateOperation ¶
func UpdateOperation(id string, status int, log *zap.SugaredLogger) error
func UpdateRenderSet ¶
func UpdateRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
func UpdateSubRenderSet ¶
func UpdateSubRenderSet(name string, kvs []*templatemodels.RenderKV, log *zap.SugaredLogger) error
func ValidateKVs ¶
func ValidateKVs(kvs []*templatemodels.RenderKV, services [][]string, log *zap.SugaredLogger) error
func ValidateRenderSet ¶
func ValidateRenderSet(productName, renderName, ServiceName string, log *zap.SugaredLogger) (*commonmodels.RenderSet, error)
ValidateRenderSet 检查指定renderSet是否能覆盖产品所有需要渲染的值
Types ¶
type CronjobPayload ¶
type IngressInfo ¶
type PipelineResource ¶
type ServiceProductMap ¶
type ServiceProductMap struct { Service string `json:"service_name"` Source string `json:"source"` Type string `json:"type"` Product []string `json:"product"` ProductName string `json:"product_name"` Containers []*commonmodels.Container `json:"containers,omitempty"` Visibility string `json:"visibility,omitempty"` CodehostID int `json:"codehost_id"` RepoOwner string `json:"repo_owner"` RepoName string `json:"repo_name"` BranchName string `json:"branch_name"` LoadPath string `json:"load_path"` LoadFromDir bool `json:"is_dir"` GerritRemoteName string `json:"gerrit_remote_name,omitempty"` }
type ServiceResp ¶
type ServiceResp struct { ServiceName string `json:"service_name"` Type string `json:"type"` Status string `json:"status"` Images []string `json:"images,omitempty"` ProductName string `json:"product_name"` EnvName string `json:"env_name"` Ingress *IngressInfo `json:"ingress"` Ready string `json:"ready"` EnvStatuses []*models.EnvStatus `json:"env_statuses,omitempty"` }
产品列表页服务Response
func ListGroupsBySource ¶
func ListGroupsBySource(envName, productName string, log *zap.SugaredLogger) ([]*ServiceResp, []resource.Ingress, error)
type ServiceTmplBuildObject ¶
type ServiceTmplBuildObject struct { ServiceTmplObject *ServiceTmplObject `json:"pm_service_tmpl"` Build *commonmodels.Build `json:"build"` }
type ServiceTmplObject ¶
type ServiceTmplObject struct { ProductName string `json:"product_name"` ServiceName string `json:"service_name"` Visibility string `json:"visibility"` Revision int64 `json:"revision"` Type string `json:"type"` Username string `json:"username"` EnvConfigs []*commonmodels.EnvConfig `json:"env_configs"` EnvStatuses []*commonmodels.EnvStatus `json:"env_statuses,omitempty"` From string `json:"from,omitempty"` }
type ServiceTmplResp ¶
type ServiceTmplResp struct { Data []*ServiceProductMap `json:"data"` Total int `json:"total"` }
func ListServiceTemplate ¶
func ListServiceTemplate(productName string, log *zap.SugaredLogger) (*ServiceTmplResp, error)
ListServiceTemplate 列出服务模板 如果team == "",则列出所有
Source Files ¶
Click to show internal directories.
Click to hide internal directories.