update devops api doc & remove not used api
Signed-off-by: soulseen <sunzhu@yunify.com>
This commit is contained in:
@@ -30,7 +30,7 @@ const jenkinsHeaderPre = "X-"
|
||||
|
||||
func GetPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipelines")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
|
||||
res, err := devops.GetPipeline(projectName, pipelineName, req.Request)
|
||||
if err != nil {
|
||||
@@ -54,8 +54,8 @@ func SearchPipelines(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func SearchPipelineRuns(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
|
||||
res, err := devops.SearchPipelineRuns(projectName, pipelineName, req.Request)
|
||||
if err != nil {
|
||||
@@ -68,10 +68,10 @@ func SearchPipelineRuns(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetBranchPipelineRun(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetBranchPipelineRun(projectName, pipelineName, branchName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -84,10 +84,10 @@ func GetBranchPipelineRun(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetPipelineRunNodesbyBranch(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetPipelineRunNodesbyBranch(projectName, pipelineName, branchName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -100,12 +100,12 @@ func GetPipelineRunNodesbyBranch(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetBranchStepLog(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
nodeId := req.PathParameter("nodeId")
|
||||
stepId := req.PathParameter("stepId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
nodeId := req.PathParameter("node")
|
||||
stepId := req.PathParameter("step")
|
||||
|
||||
res, header, err := devops.GetBranchStepLog(projectName, pipelineName, branchName, runId, nodeId, stepId, req.Request)
|
||||
|
||||
@@ -122,11 +122,11 @@ func GetBranchStepLog(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetStepLog(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
nodeId := req.PathParameter("nodeId")
|
||||
stepId := req.PathParameter("stepId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
nodeId := req.PathParameter("node")
|
||||
stepId := req.PathParameter("step")
|
||||
|
||||
res, header, err := devops.GetStepLog(projectName, pipelineName, runId, nodeId, stepId, req.Request)
|
||||
if err != nil {
|
||||
@@ -142,7 +142,7 @@ func GetStepLog(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func Validate(req *restful.Request, resp *restful.Response) {
|
||||
scmId := req.PathParameter("scmId")
|
||||
scmId := req.PathParameter("scm")
|
||||
|
||||
res, err := devops.Validate(scmId, req.Request)
|
||||
if err != nil {
|
||||
@@ -155,7 +155,7 @@ func Validate(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetSCMOrg(req *restful.Request, resp *restful.Response) {
|
||||
scmId := req.PathParameter("scmId")
|
||||
scmId := req.PathParameter("scm")
|
||||
|
||||
res, err := devops.GetSCMOrg(scmId, req.Request)
|
||||
if err != nil {
|
||||
@@ -168,8 +168,8 @@ func GetSCMOrg(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetOrgRepo(req *restful.Request, resp *restful.Response) {
|
||||
scmId := req.PathParameter("scmId")
|
||||
organizationId := req.PathParameter("organizationId")
|
||||
scmId := req.PathParameter("scm")
|
||||
organizationId := req.PathParameter("organization")
|
||||
|
||||
res, err := devops.GetOrgRepo(scmId, organizationId, req.Request)
|
||||
if err != nil {
|
||||
@@ -182,10 +182,10 @@ func GetOrgRepo(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func StopBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.StopBranchPipeline(projectName, pipelineName, branchName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -198,9 +198,9 @@ func StopBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func StopPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.StopPipeline(projectName, pipelineName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -213,10 +213,10 @@ func StopPipeline(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func ReplayBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.ReplayBranchPipeline(projectName, pipelineName, branchName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -229,9 +229,9 @@ func ReplayBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func ReplayPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.ReplayPipeline(projectName, pipelineName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -244,10 +244,10 @@ func ReplayPipeline(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetBranchRunLog(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetBranchRunLog(projectName, pipelineName, branchName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -259,9 +259,9 @@ func GetBranchRunLog(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetRunLog(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetRunLog(projectName, pipelineName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -273,10 +273,10 @@ func GetRunLog(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetBranchArtifacts(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetBranchArtifacts(projectName, pipelineName, branchName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -288,9 +288,9 @@ func GetBranchArtifacts(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetArtifacts(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetArtifacts(projectName, pipelineName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -302,8 +302,8 @@ func GetArtifacts(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetPipeBranch(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
|
||||
res, err := devops.GetPipeBranch(projectName, pipelineName, req.Request)
|
||||
if err != nil {
|
||||
@@ -315,12 +315,12 @@ func GetPipeBranch(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func CheckBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
nodeId := req.PathParameter("nodeId")
|
||||
stepId := req.PathParameter("stepId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
nodeId := req.PathParameter("node")
|
||||
stepId := req.PathParameter("step")
|
||||
|
||||
res, err := devops.CheckBranchPipeline(projectName, pipelineName, branchName, runId, nodeId, stepId, req.Request)
|
||||
if err != nil {
|
||||
@@ -332,11 +332,11 @@ func CheckBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func CheckPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
nodeId := req.PathParameter("nodeId")
|
||||
stepId := req.PathParameter("stepId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
nodeId := req.PathParameter("node")
|
||||
stepId := req.PathParameter("step")
|
||||
|
||||
res, err := devops.CheckPipeline(projectName, pipelineName, runId, nodeId, stepId, req.Request)
|
||||
if err != nil {
|
||||
@@ -348,8 +348,8 @@ func CheckPipeline(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetConsoleLog(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
|
||||
res, err := devops.GetConsoleLog(projectName, pipelineName, req.Request)
|
||||
if err != nil {
|
||||
@@ -361,8 +361,8 @@ func GetConsoleLog(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func ScanBranch(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
|
||||
res, err := devops.ScanBranch(projectName, pipelineName, req.Request)
|
||||
if err != nil {
|
||||
@@ -374,9 +374,9 @@ func ScanBranch(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func RunBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
|
||||
res, err := devops.RunBranchPipeline(projectName, pipelineName, branchName, req.Request)
|
||||
if err != nil {
|
||||
@@ -389,8 +389,8 @@ func RunBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func RunPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
|
||||
res, err := devops.RunPipeline(projectName, pipelineName, req.Request)
|
||||
if err != nil {
|
||||
@@ -402,39 +402,6 @@ func RunPipeline(req *restful.Request, resp *restful.Response) {
|
||||
resp.Write(res)
|
||||
}
|
||||
|
||||
func GetBranchStepsStatus(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
nodeId := req.PathParameter("nodeId")
|
||||
|
||||
res, err := devops.GetBranchStepsStatus(projectName, pipelineName, branchName, runId, nodeId, req.Request)
|
||||
if err != nil {
|
||||
parseErr(err, resp)
|
||||
return
|
||||
}
|
||||
|
||||
resp.Header().Set(restful.HEADER_ContentType, restful.MIME_JSON)
|
||||
resp.Write(res)
|
||||
}
|
||||
|
||||
func GetStepsStatus(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
nodeId := req.PathParameter("nodeId")
|
||||
|
||||
res, err := devops.GetStepsStatus(projectName, pipelineName, runId, nodeId, req.Request)
|
||||
if err != nil {
|
||||
parseErr(err, resp)
|
||||
return
|
||||
}
|
||||
|
||||
resp.Header().Set(restful.HEADER_ContentType, restful.MIME_JSON)
|
||||
resp.Write(res)
|
||||
}
|
||||
|
||||
func GetCrumb(req *restful.Request, resp *restful.Response) {
|
||||
res, err := devops.GetCrumb(req.Request)
|
||||
if err != nil {
|
||||
@@ -482,9 +449,9 @@ func CheckCron(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetPipelineRun(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetPipelineRun(projectName, pipelineName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -497,9 +464,9 @@ func GetPipelineRun(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
|
||||
res, err := devops.GetBranchPipeline(projectName, pipelineName, branchName, req.Request)
|
||||
if err != nil {
|
||||
@@ -512,9 +479,9 @@ func GetBranchPipeline(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetPipelineRunNodes(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetPipelineRunNodes(projectName, pipelineName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -526,11 +493,11 @@ func GetPipelineRunNodes(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetBranchNodeSteps(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
nodeId := req.PathParameter("nodeId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
nodeId := req.PathParameter("node")
|
||||
|
||||
res, err := devops.GetBranchNodeSteps(projectName, pipelineName, branchName, runId, nodeId, req.Request)
|
||||
if err != nil {
|
||||
@@ -542,10 +509,10 @@ func GetBranchNodeSteps(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetNodeSteps(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
nodeId := req.PathParameter("nodeId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
nodeId := req.PathParameter("node")
|
||||
|
||||
res, err := devops.GetNodeSteps(projectName, pipelineName, runId, nodeId, req.Request)
|
||||
if err != nil {
|
||||
@@ -603,10 +570,10 @@ func GithubWebhook(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetBranchNodesDetail(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
branchName := req.PathParameter("branchName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
branchName := req.PathParameter("branch")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetBranchNodesDetail(projectName, pipelineName, branchName, runId, req.Request)
|
||||
if err != nil {
|
||||
@@ -617,9 +584,9 @@ func GetBranchNodesDetail(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func GetNodesDetail(req *restful.Request, resp *restful.Response) {
|
||||
projectName := req.PathParameter("projectName")
|
||||
pipelineName := req.PathParameter("pipelineName")
|
||||
runId := req.PathParameter("runId")
|
||||
projectName := req.PathParameter("devops")
|
||||
pipelineName := req.PathParameter("pipeline")
|
||||
runId := req.PathParameter("run")
|
||||
|
||||
res, err := devops.GetNodesDetail(projectName, pipelineName, runId, req.Request)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user