Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusActive = "active" StatusDeleted = "deleted" StatusDeleting = "deleting" StatusFailed = "failed" StatusPending = "pending" StatusWorking = "working" StatusSuccessful = "successful" )
View Source
const ( StatusColumn = "status" StatusTimeColumn = "status_time" )
View Source
const (
GetS2iBinaryURL = "http://ks-apiserver.kubesphere-system.svc/kapis/devops.kubesphere.io/v1alpha2/namespaces/%s/s2ibinaries/%s/file/%s"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DevopsOperator ¶
type DevopsOperator interface {
CreateDevOpsProject(workspace string, project *devopsv1alpha3.DevOpsProject) (*devopsv1alpha3.DevOpsProject, error)
GetDevOpsProject(workspace string, projectName string) (*devopsv1alpha3.DevOpsProject, error)
GetDevOpsProjectByGenerateName(workspace string, projectName string) (*devopsv1alpha3.DevOpsProject, error)
DeleteDevOpsProject(workspace string, projectName string) error
UpdateDevOpsProject(workspace string, project *devopsv1alpha3.DevOpsProject) (*devopsv1alpha3.DevOpsProject, error)
ListDevOpsProject(user user.Info, workspace string, queryParam *query.Query) (*api.ListResult, error)
CheckDevopsProject(workspace, projectName string) (map[string]interface{}, error)
CreatePipelineObj(projectName string, pipeline *devopsv1alpha3.Pipeline) (*devopsv1alpha3.Pipeline, error)
GetPipelineObj(projectName string, pipelineName string) (*devopsv1alpha3.Pipeline, error)
DeletePipelineObj(projectName string, pipelineName string) error
UpdatePipelineObj(projectName string, pipeline *devopsv1alpha3.Pipeline) (*devopsv1alpha3.Pipeline, error)
ListPipelineObj(projectName string, query *query.Query) (api.ListResult, error)
UpdateJenkinsfile(projectName, pipelineName, mode, jenkinsfile string) error
CreateCredentialObj(projectName string, s *v1.Secret) (*v1.Secret, error)
GetCredentialObj(projectName string, secretName string) (*v1.Secret, error)
DeleteCredentialObj(projectName string, secretName string) error
UpdateCredentialObj(projectName string, secret *v1.Secret) (*v1.Secret, error)
ListCredentialObj(projectName string, query *query.Query) (api.ListResult, error)
CheckPipelineName(projectName, pipelineName string, req *http.Request) (map[string]interface{}, error)
GetPipeline(projectName, pipelineName string, req *http.Request) (*devops.Pipeline, error)
ListPipelines(req *http.Request) (*devops.PipelineList, error)
GetPipelineRun(projectName, pipelineName, runId string, req *http.Request) (*devops.PipelineRun, error)
ListPipelineRuns(projectName, pipelineName string, req *http.Request) (*devops.PipelineRunList, error)
StopPipeline(projectName, pipelineName, runId string, req *http.Request) (*devops.StopPipeline, error)
ReplayPipeline(projectName, pipelineName, runId string, req *http.Request) (*devops.ReplayPipeline, error)
RunPipeline(projectName, pipelineName string, req *http.Request) (*devops.RunPipeline, error)
GetArtifacts(projectName, pipelineName, runId string, req *http.Request) ([]devops.Artifacts, error)
GetRunLog(projectName, pipelineName, runId string, req *http.Request) ([]byte, error)
GetStepLog(projectName, pipelineName, runId, nodeId, stepId string, req *http.Request) ([]byte, http.Header, error)
GetNodeSteps(projectName, pipelineName, runId, nodeId string, req *http.Request) ([]devops.NodeSteps, error)
GetPipelineRunNodes(projectName, pipelineName, runId string, req *http.Request) ([]devops.PipelineRunNodes, error)
SubmitInputStep(projectName, pipelineName, runId, nodeId, stepId string, req *http.Request) ([]byte, error)
GetNodesDetail(projectName, pipelineName, runId string, req *http.Request) ([]devops.NodesDetail, error)
GetBranchPipeline(projectName, pipelineName, branchName string, req *http.Request) (*devops.BranchPipeline, error)
GetBranchPipelineRun(projectName, pipelineName, branchName, runId string, req *http.Request) (*devops.PipelineRun, error)
StopBranchPipeline(projectName, pipelineName, branchName, runId string, req *http.Request) (*devops.StopPipeline, error)
ReplayBranchPipeline(projectName, pipelineName, branchName, runId string, req *http.Request) (*devops.ReplayPipeline, error)
RunBranchPipeline(projectName, pipelineName, branchName string, req *http.Request) (*devops.RunPipeline, error)
GetBranchArtifacts(projectName, pipelineName, branchName, runId string, req *http.Request) ([]devops.Artifacts, error)
GetBranchRunLog(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error)
GetBranchStepLog(projectName, pipelineName, branchName, runId, nodeId, stepId string, req *http.Request) ([]byte, http.Header, error)
GetBranchNodeSteps(projectName, pipelineName, branchName, runId, nodeId string, req *http.Request) ([]devops.NodeSteps, error)
GetBranchPipelineRunNodes(projectName, pipelineName, branchName, runId string, req *http.Request) ([]devops.BranchPipelineRunNodes, error)
SubmitBranchInputStep(projectName, pipelineName, branchName, runId, nodeId, stepId string, req *http.Request) ([]byte, error)
GetBranchNodesDetail(projectName, pipelineName, branchName, runId string, req *http.Request) ([]devops.NodesDetail, error)
GetPipelineBranch(projectName, pipelineName string, req *http.Request) (*devops.PipelineBranch, error)
ScanBranch(projectName, pipelineName string, req *http.Request) ([]byte, error)
GetConsoleLog(projectName, pipelineName string, req *http.Request) ([]byte, error)
GetCrumb(req *http.Request) (*devops.Crumb, error)
GetSCMServers(scmId string, req *http.Request) ([]devops.SCMServer, error)
GetSCMOrg(scmId string, req *http.Request) ([]devops.SCMOrg, error)
GetOrgRepo(scmId, organizationId string, req *http.Request) (devops.OrgRepo, error)
CreateSCMServers(scmId string, req *http.Request) (*devops.SCMServer, error)
Validate(scmId string, req *http.Request) (*devops.Validates, error)
GetNotifyCommit(req *http.Request) ([]byte, error)
GithubWebhook(req *http.Request) ([]byte, error)
GenericWebhook(req *http.Request) ([]byte, error)
CheckScriptCompile(projectName, pipelineName string, req *http.Request) (*devops.CheckScript, error)
CheckCron(projectName string, req *http.Request) (*devops.CheckCronRes, error)
GetJenkinsAgentLabels() ([]string, error)
}
func NewDevopsOperator ¶
func NewDevopsOperator(client devops.Interface, k8sclient kubernetes.Interface, ksclient kubesphere.Interface, am am.AccessManagementInterface) DevopsOperator
type PipelineSonarGetter ¶
type PipelineSonarGetter interface {
GetPipelineSonar(projectId, pipelineId string) ([]*sonarqube.SonarStatus, error)
GetMultiBranchPipelineSonar(projectId, pipelineId, branchId string) ([]*sonarqube.SonarStatus, error)
}
func NewPipelineSonarGetter ¶
func NewPipelineSonarGetter(devopClient devops.BuildGetter, sonarClient sonarqube.SonarInterface) PipelineSonarGetter
type ProjectCredentialGetter ¶
type ProjectCredentialGetter interface {
GetProjectCredentialUsage(projectId, credentialId string) (*devops.Credential, error)
}
func NewProjectCredentialOperator ¶
func NewProjectCredentialOperator(devopsClient devops.Interface) ProjectCredentialGetter
type S2iBinaryUploader ¶
type S2iBinaryUploader interface {
UploadS2iBinary(namespace, name, md5 string, header *multipart.FileHeader) (*v1alpha1.S2iBinary, error)
DownloadS2iBinary(namespace, name, fileName string) (string, error)
}
func NewS2iBinaryUploader ¶
func NewS2iBinaryUploader(client versioned.Interface, informers externalversions.SharedInformerFactory, s3Client s3.Interface, k8sClient k8s.Client) S2iBinaryUploader
Click to show internal directories.
Click to hide internal directories.