@@ -19,6 +19,7 @@ package devops
|
||||
|
||||
import (
|
||||
"compress/gzip"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
log "github.com/golang/glog"
|
||||
@@ -28,9 +29,12 @@ import (
|
||||
"kubesphere.io/kubesphere/pkg/simple/client/admin_jenkins"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const channelMaxCapacity = 100
|
||||
|
||||
var jenkins *gojenkins.Jenkins
|
||||
|
||||
func PreCheckJenkins() {
|
||||
@@ -102,8 +106,21 @@ func GetPipelineRunNodesbyBranch(projectName, pipelineName, branchName, runId st
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetStepLog(projectName, pipelineName, branchName, runId, nodeId, stepId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetStepLogUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId, nodeId, stepId)
|
||||
func GetBranchStepLog(projectName, pipelineName, branchName, runId, nodeId, stepId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetBranchStepLogUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId, nodeId, stepId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
resBody, err := sendJenkinsRequest(baseUrl, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resBody, err
|
||||
}
|
||||
|
||||
func GetStepLog(projectName, pipelineName, runId, nodeId, stepId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetStepLogUrl+req.URL.RawQuery, projectName, pipelineName, runId, nodeId, stepId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
resBody, err := sendJenkinsRequest(baseUrl, req)
|
||||
@@ -154,8 +171,8 @@ func GetOrgRepo(scmId, organizationId string, req *http.Request) ([]byte, error)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func StopPipeline(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+StopPipelineUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
func StopBranchPipeline(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+StopBranchPipelineUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
@@ -167,8 +184,8 @@ func StopPipeline(projectName, pipelineName, branchName, runId string, req *http
|
||||
return res, err
|
||||
}
|
||||
|
||||
func ReplayPipeline(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+ReplayPipelineUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
func StopPipeline(projectName, pipelineName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+StopPipelineUrl+req.URL.RawQuery, projectName, pipelineName, runId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
@@ -180,8 +197,8 @@ func ReplayPipeline(projectName, pipelineName, branchName, runId string, req *ht
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetRunLog(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetRunLogUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
func ReplayBranchPipeline(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+ReplayBranchPipelineUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
@@ -193,8 +210,60 @@ func GetRunLog(projectName, pipelineName, branchName, runId string, req *http.Re
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetArtifacts(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetArtifactsUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
func ReplayPipeline(projectName, pipelineName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+ReplayPipelineUrl+req.URL.RawQuery, projectName, pipelineName, runId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetBranchRunLog(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetBranchRunLogUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetRunLog(projectName, pipelineName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetRunLogUrl+req.URL.RawQuery, projectName, pipelineName, runId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetBranchArtifacts(projectName, pipelineName, branchName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetBranchArtifactsUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetArtifacts(projectName, pipelineName, runId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetArtifactsUrl+req.URL.RawQuery, projectName, pipelineName, runId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
@@ -219,8 +288,21 @@ func GetPipeBranch(projectName, pipelineName string, req *http.Request) ([]byte,
|
||||
return res, err
|
||||
}
|
||||
|
||||
func CheckPipeline(projectName, pipelineName, branchName, runId, nodeId, stepId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+CheckPipelineUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId, nodeId, stepId)
|
||||
func CheckBranchPipeline(projectName, pipelineName, branchName, runId, nodeId, stepId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+CheckBranchPipelineUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId, nodeId, stepId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
resBody, err := sendJenkinsRequest(baseUrl, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resBody, err
|
||||
}
|
||||
|
||||
func CheckPipeline(projectName, pipelineName, runId, nodeId, stepId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+CheckPipelineUrl+req.URL.RawQuery, projectName, pipelineName, runId, nodeId, stepId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
resBody, err := sendJenkinsRequest(baseUrl, req)
|
||||
@@ -271,8 +353,21 @@ func RunPipeline(projectName, pipelineName, branchName string, req *http.Request
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetStepsStatus(projectName, pipelineName, branchName, runId, nodeId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetStepsStatusUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId, nodeId)
|
||||
func GetBranchStepsStatus(projectName, pipelineName, branchName, runId, nodeId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetBranchStepsStatusUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId, nodeId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetStepsStatus(projectName, pipelineName, runId, nodeId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetStepsStatusUrl+req.URL.RawQuery, projectName, pipelineName, runId, nodeId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
@@ -375,8 +470,21 @@ func GetPipelineRunNodes(projectName, pipelineName, runId string, req *http.Requ
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetNodeSteps(projectName, pipelineName, branchName, runId, nodeId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetNodeStepsUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId, nodeId)
|
||||
func GetBranchNodeSteps(projectName, pipelineName, branchName, runId, nodeId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetBranchNodeStepsUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId, nodeId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetNodeSteps(projectName, pipelineName, runId, nodeId string, req *http.Request) ([]byte, error) {
|
||||
baseUrl := fmt.Sprintf(jenkins.Server+GetNodeStepsUrl+req.URL.RawQuery, projectName, pipelineName, runId, nodeId)
|
||||
log.Infof("Jenkins-url: " + baseUrl)
|
||||
|
||||
res, err := sendJenkinsRequest(baseUrl, req)
|
||||
@@ -441,6 +549,100 @@ func GithubWebhook(req *http.Request) ([]byte, error) {
|
||||
return res, err
|
||||
}
|
||||
|
||||
func GetBranchNodesDetail(projectName, pipelineName, branchName, runId string, req *http.Request) ([]NodesDetail, error) {
|
||||
getNodesUrl := fmt.Sprintf(jenkins.Server+GetBranchPipeRunNodesUrl+req.URL.RawQuery, projectName, pipelineName, branchName, runId)
|
||||
log.Infof("getNodesUrl: " + getNodesUrl)
|
||||
var wg sync.WaitGroup
|
||||
var nodesDetails []NodesDetail
|
||||
stepChan := make(chan *NodesStepsIndex, channelMaxCapacity)
|
||||
|
||||
respNodes, err := GetPipelineRunNodesbyBranch(projectName, pipelineName, branchName, runId, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
err = json.Unmarshal(respNodes, &nodesDetails)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// get all steps in nodes.
|
||||
for i, v := range nodesDetails {
|
||||
wg.Add(1)
|
||||
go func(nodeId string, index int) {
|
||||
var steps []NodeSteps
|
||||
respSteps, err := GetBranchNodeSteps(projectName, pipelineName, branchName, runId, nodeId, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return
|
||||
}
|
||||
err = json.Unmarshal(respSteps, &steps)
|
||||
|
||||
stepChan <- &NodesStepsIndex{index, steps}
|
||||
wg.Done()
|
||||
}(v.ID, i)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
close(stepChan)
|
||||
|
||||
for oneNodeSteps := range stepChan {
|
||||
if oneNodeSteps != nil {
|
||||
nodesDetails[oneNodeSteps.Id].Steps = append(nodesDetails[oneNodeSteps.Id].Steps, oneNodeSteps.Steps...)
|
||||
}
|
||||
}
|
||||
|
||||
return nodesDetails, err
|
||||
}
|
||||
|
||||
func GetNodesDetail(projectName, pipelineName, runId string, req *http.Request) ([]NodesDetail, error) {
|
||||
getNodesUrl := fmt.Sprintf(jenkins.Server+GetPipeRunNodesUrl+req.URL.RawQuery, projectName, pipelineName, runId)
|
||||
log.Infof("getNodesUrl: " + getNodesUrl)
|
||||
var wg sync.WaitGroup
|
||||
var nodesDetails []NodesDetail
|
||||
stepChan := make(chan *NodesStepsIndex, channelMaxCapacity)
|
||||
|
||||
respNodes, err := GetPipelineRunNodes(projectName, pipelineName, runId, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
err = json.Unmarshal(respNodes, &nodesDetails)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// get all steps in nodes.
|
||||
for i, v := range nodesDetails {
|
||||
wg.Add(1)
|
||||
go func(nodeId string, index int) {
|
||||
var steps []NodeSteps
|
||||
respSteps, err := GetNodeSteps(projectName, pipelineName, runId, nodeId, req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return
|
||||
}
|
||||
err = json.Unmarshal(respSteps, &steps)
|
||||
|
||||
stepChan <- &NodesStepsIndex{index, steps}
|
||||
wg.Done()
|
||||
}(v.ID, i)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
close(stepChan)
|
||||
|
||||
for oneNodeSteps := range stepChan {
|
||||
if oneNodeSteps != nil {
|
||||
nodesDetails[oneNodeSteps.Id].Steps = append(nodesDetails[oneNodeSteps.Id].Steps, oneNodeSteps.Steps...)
|
||||
}
|
||||
}
|
||||
|
||||
return nodesDetails, err
|
||||
}
|
||||
|
||||
// create jenkins request
|
||||
func sendJenkinsRequest(baseUrl string, req *http.Request) ([]byte, error) {
|
||||
newReqUrl, err := url.Parse(baseUrl)
|
||||
|
||||
@@ -946,7 +946,7 @@ type BranchPipeline struct {
|
||||
} `json:"branch,omitempty"`
|
||||
}
|
||||
|
||||
// GetPipeRunNodes
|
||||
// GetPipelineRunNodes
|
||||
type PipelineRunNodes struct {
|
||||
Class string `json:"_class,omitempty"`
|
||||
Links struct {
|
||||
@@ -1056,3 +1056,45 @@ type ResJson struct {
|
||||
} `json:"json,omitempty"`
|
||||
} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type NodesDetail struct {
|
||||
Class string `json:"_class,omitempty"`
|
||||
Links struct {
|
||||
Self struct {
|
||||
Class string `json:"_class,omitempty"`
|
||||
Href string `json:"href,omitempty"`
|
||||
} `json:"self,omitempty"`
|
||||
Actions struct {
|
||||
Class string `json:"_class,omitempty"`
|
||||
Href string `json:"href,omitempty"`
|
||||
} `json:"actions,omitempty"`
|
||||
Steps struct {
|
||||
Class string `json:"_class,omitempty"`
|
||||
Href string `json:"href,omitempty"`
|
||||
} `json:"steps,omitempty"`
|
||||
} `json:"_links,omitempty"`
|
||||
Actions []interface{} `json:"actions,omitempty"`
|
||||
DisplayDescription interface{} `json:"displayDescription,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty"`
|
||||
DurationInMillis int `json:"durationInMillis,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
Input interface{} `json:"input,omitempty"`
|
||||
Result string `json:"result,omitempty"`
|
||||
StartTime string `json:"startTime,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"`
|
||||
Edges []struct {
|
||||
Class string `json:"_class,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
} `json:"edges,omitempty"`
|
||||
FirstParent interface{} `json:"firstParent,omitempty"`
|
||||
Restartable bool `json:"restartable,omitempty"`
|
||||
Steps []NodeSteps `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
type NodesStepsIndex struct {
|
||||
Id int `json:"id,omitempty"`
|
||||
Steps []NodeSteps `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
@@ -19,32 +19,40 @@ package devops
|
||||
|
||||
// Some apis for Jenkins.
|
||||
const (
|
||||
GetPipeBranchUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/?"
|
||||
GetBranchPipeUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/"
|
||||
GetPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/"
|
||||
SearchPipelineUrl = "/blue/rest/search/?"
|
||||
SearchPipelineRunUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/?"
|
||||
RunPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/"
|
||||
GetPipelineRunUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/"
|
||||
GetPipeBranchRunUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/"
|
||||
SearchPipelineRunUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/?"
|
||||
GetBranchPipeRunNodesUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/nodes/?"
|
||||
GetStepLogUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/nodes/%s/steps/%s/log/?"
|
||||
GetPipeRunNodesUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/nodes/?"
|
||||
GetBranchRunLogUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/log/?"
|
||||
GetRunLogUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/log/?"
|
||||
GetBranchStepLogUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/nodes/%s/steps/%s/log/?"
|
||||
GetStepLogUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/nodes/%s/steps/%s/log/?"
|
||||
StopBranchPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/stop/?"
|
||||
StopPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/stop/?"
|
||||
ReplayBranchPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/replay/"
|
||||
ReplayPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/replay/"
|
||||
GetBranchArtifactsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/artifacts/?"
|
||||
GetArtifactsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/artifacts/?"
|
||||
GetBranchStepsStatusUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/nodes/%s/steps/?"
|
||||
GetStepsStatusUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/nodes/%s/steps/?"
|
||||
CheckBranchPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/nodes/%s/steps/%s/"
|
||||
CheckPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/nodes/%s/steps/%s/"
|
||||
GetBranchNodeStepsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/nodes/%s/steps/?"
|
||||
GetNodeStepsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/nodes/%s/steps/?"
|
||||
ValidateUrl = "/blue/rest/organizations/jenkins/scm/%s/validate"
|
||||
GetSCMOrgUrl = "/blue/rest/organizations/jenkins/scm/%s/organizations/?"
|
||||
GetOrgRepoUrl = "/blue/rest/organizations/jenkins/scm/%s/organizations/%s/repositories/?"
|
||||
StopPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/stop/?"
|
||||
ReplayPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/replay/"
|
||||
GetRunLogUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/log/?"
|
||||
GetArtifactsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/artifacts/?"
|
||||
GetPipeBranchUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/?"
|
||||
GetConsoleLogUrl = "/job/%s/job/%s/indexing/consoleText"
|
||||
ScanBranchUrl = "/job/%s/job/%s/build?"
|
||||
RunPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/"
|
||||
GetStepsStatusUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/nodes/%s/steps/?"
|
||||
CheckPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/nodes/%s/steps/%s/"
|
||||
GetCrumbUrl = "/crumbIssuer/api/json/"
|
||||
CheckScriptCompileUrl = "/job/init-job/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile"
|
||||
CheckCronUrl = "/job/init-job/descriptorByName/hudson.triggers.TimerTrigger/checkSpec?"
|
||||
GetPipelineRunUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/"
|
||||
GetBranchPipeUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/"
|
||||
GetPipeRunNodesUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/runs/%s/nodes/?"
|
||||
GetNodeStepsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/%s/branches/%s/runs/%s/nodes/%s/steps/?"
|
||||
ToJenkinsfileUrl = "/pipeline-model-converter/toJenkinsfile"
|
||||
ToJsonUrl = "/pipeline-model-converter/toJson"
|
||||
GetNotifyCommitUrl = "/git/notifyCommit/?"
|
||||
|
||||
Reference in New Issue
Block a user