fix create pipeline error
fix get pipelinerun list feature kapi for devopsproject pipeline credential fix get pipelinebranch fix create credential api Signed-off-by: shaowenchen <mail@chenshaowen.com>
This commit is contained in:
@@ -233,6 +233,7 @@ func (j *Jenkins) CreateCredentialInProject(projectId string, credential *v1.Sec
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if response.StatusCode != http.StatusOK {
|
||||
return "", errors.New(strconv.Itoa(response.StatusCode))
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ func (j *Jenkins) ListPipelineRuns(projectName, pipelineName string, httpParamet
|
||||
PipelineOjb := &Pipeline{
|
||||
HttpParameters: httpParameters,
|
||||
Jenkins: j,
|
||||
Path: ListPipelineRunUrl + httpParameters.Url.RawQuery,
|
||||
Path: fmt.Sprintf(ListPipelineRunUrl, projectName, pipelineName) + httpParameters.Url.RawQuery,
|
||||
}
|
||||
res, err := PipelineOjb.ListPipelineRuns()
|
||||
return res, err
|
||||
|
||||
@@ -145,7 +145,7 @@ func (p *Pipeline) ListPipelineRuns() (*devops.PipelineRunList, error) {
|
||||
}
|
||||
|
||||
var pipelineRunList devops.PipelineRunList
|
||||
err = json.Unmarshal(res, &pipelineRunList)
|
||||
err = json.Unmarshal(res, &pipelineRunList.Items)
|
||||
if err != nil {
|
||||
klog.Error(err)
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user