未验证 提交 736582be 编写于 作者: Z zryfish 提交者: GitHub

Merge pull request #468 from runzexia/devops-docs

devops api doc update
...@@ -50,7 +50,7 @@ func addWebService(c *restful.Container) error { ...@@ -50,7 +50,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{devops}"). webservice.Route(webservice.GET("/devops/{devops}").
To(devopsapi.GetDevOpsProjectHandler). To(devopsapi.GetDevOpsProjectHandler).
Doc("get devops project"). Doc("Get devops project").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Returns(http.StatusOK, RespOK, devops.DevOpsProject{}). Returns(http.StatusOK, RespOK, devops.DevOpsProject{}).
...@@ -58,15 +58,16 @@ func addWebService(c *restful.Container) error { ...@@ -58,15 +58,16 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.PATCH("/devops/{devops}"). webservice.Route(webservice.PATCH("/devops/{devops}").
To(devopsapi.UpdateProjectHandler). To(devopsapi.UpdateProjectHandler).
Doc("get devops project"). Doc("Update devops project").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Reads(devops.DevOpsProject{}).
Returns(http.StatusOK, RespOK, devops.DevOpsProject{}). Returns(http.StatusOK, RespOK, devops.DevOpsProject{}).
Writes(devops.DevOpsProject{})) Writes(devops.DevOpsProject{}))
webservice.Route(webservice.GET("/devops/{devops}/defaultroles"). webservice.Route(webservice.GET("/devops/{devops}/defaultroles").
To(devopsapi.GetDevOpsProjectDefaultRoles). To(devopsapi.GetDevOpsProjectDefaultRoles).
Doc("get devops project defaultroles"). Doc("Get devops project default roles").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Returns(http.StatusOK, RespOK, []devops.Role{}). Returns(http.StatusOK, RespOK, []devops.Role{}).
...@@ -74,7 +75,7 @@ func addWebService(c *restful.Container) error { ...@@ -74,7 +75,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{devops}/members"). webservice.Route(webservice.GET("/devops/{devops}/members").
To(devopsapi.GetDevOpsProjectMembersHandler). To(devopsapi.GetDevOpsProjectMembersHandler).
Doc("get devops project members"). Doc("Get devops project members").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.QueryParameter(params.PagingParam, "page"). Param(webservice.QueryParameter(params.PagingParam, "page").
...@@ -89,7 +90,7 @@ func addWebService(c *restful.Container) error { ...@@ -89,7 +90,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{devops}/members/{members}"). webservice.Route(webservice.GET("/devops/{devops}/members/{members}").
To(devopsapi.GetDevOpsProjectMemberHandler). To(devopsapi.GetDevOpsProjectMemberHandler).
Doc("get devops project member"). Doc("Get devops project member").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("members", "member's username")). Param(webservice.PathParameter("members", "member's username")).
...@@ -98,7 +99,7 @@ func addWebService(c *restful.Container) error { ...@@ -98,7 +99,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.POST("/devops/{devops}/members"). webservice.Route(webservice.POST("/devops/{devops}/members").
To(devopsapi.AddDevOpsProjectMemberHandler). To(devopsapi.AddDevOpsProjectMemberHandler).
Doc("add devops project members"). Doc("Add devops project members").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Returns(http.StatusOK, RespOK, devops.DevOpsProjectMembership{}). Returns(http.StatusOK, RespOK, devops.DevOpsProjectMembership{}).
...@@ -106,7 +107,7 @@ func addWebService(c *restful.Container) error { ...@@ -106,7 +107,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.PATCH("/devops/{devops}/members/{members}"). webservice.Route(webservice.PATCH("/devops/{devops}/members/{members}").
To(devopsapi.UpdateDevOpsProjectMemberHandler). To(devopsapi.UpdateDevOpsProjectMemberHandler).
Doc("update devops project members"). Doc("Update devops project members").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("members", "member's username")). Param(webservice.PathParameter("members", "member's username")).
...@@ -115,7 +116,7 @@ func addWebService(c *restful.Container) error { ...@@ -115,7 +116,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.DELETE("/devops/{devops}/members/{members}"). webservice.Route(webservice.DELETE("/devops/{devops}/members/{members}").
To(devopsapi.DeleteDevOpsProjectMemberHandler). To(devopsapi.DeleteDevOpsProjectMemberHandler).
Doc("delete devops project members"). Doc("Delete devops project members").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("members", "member's username")). Param(webservice.PathParameter("members", "member's username")).
...@@ -123,7 +124,7 @@ func addWebService(c *restful.Container) error { ...@@ -123,7 +124,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.POST("/devops/{devops}/pipelines"). webservice.Route(webservice.POST("/devops/{devops}/pipelines").
To(devopsapi.CreateDevOpsProjectPipelineHandler). To(devopsapi.CreateDevOpsProjectPipelineHandler).
Doc("add devops project pipeline"). Doc("Add devops project pipeline").
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Returns(http.StatusOK, RespOK, devops.ProjectPipeline{}). Returns(http.StatusOK, RespOK, devops.ProjectPipeline{}).
...@@ -132,9 +133,9 @@ func addWebService(c *restful.Container) error { ...@@ -132,9 +133,9 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.PUT("/devops/{devops}/pipelines/{pipelines}"). webservice.Route(webservice.PUT("/devops/{devops}/pipelines/{pipelines}").
To(devopsapi.UpdateDevOpsProjectPipelineHandler). To(devopsapi.UpdateDevOpsProjectPipelineHandler).
Doc("update devops project pipeline"). Doc("Update devops project pipeline").
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("pipelines", "pipeline name")). Param(webservice.PathParameter("pipelines", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Returns(http.StatusOK, RespOK, devops.ProjectPipeline{}). Returns(http.StatusOK, RespOK, devops.ProjectPipeline{}).
Writes(devops.ProjectPipeline{}). Writes(devops.ProjectPipeline{}).
...@@ -142,49 +143,49 @@ func addWebService(c *restful.Container) error { ...@@ -142,49 +143,49 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipelines}/config"). webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipelines}/config").
To(devopsapi.GetDevOpsProjectPipelineHandler). To(devopsapi.GetDevOpsProjectPipelineHandler).
Doc("get devops project pipeline config"). Doc("Get devops project pipeline config").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("pipelines", "pipeline name")). Param(webservice.PathParameter("pipelines", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Returns(http.StatusOK, RespOK, devops.ProjectPipeline{}). Returns(http.StatusOK, RespOK, devops.ProjectPipeline{}).
Writes(devops.ProjectPipeline{})) Writes(devops.ProjectPipeline{}))
webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipelines}/sonarStatus"). webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipelines}/sonarStatus").
To(devopsapi.GetPipelineSonarStatusHandler). To(devopsapi.GetPipelineSonarStatusHandler).
Doc("get devops project pipeline sonarStatus"). Doc("Get devops project pipeline sonarStatus").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("pipelines", "pipeline name")). Param(webservice.PathParameter("pipelines", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Returns(http.StatusOK, RespOK, []devops.SonarStatus{}). Returns(http.StatusOK, RespOK, []devops.SonarStatus{}).
Writes([]devops.SonarStatus{})) Writes([]devops.SonarStatus{}))
webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipelines}/branches/{branches}/sonarStatus"). webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipelines}/branches/{branches}/sonarStatus").
To(devopsapi.GetMultiBranchesPipelineSonarStatusHandler). To(devopsapi.GetMultiBranchesPipelineSonarStatusHandler).
Doc("get devops project pipeline sonarStatus"). Doc("Get devops project pipeline sonarStatus").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("pipelines", "pipeline name")). Param(webservice.PathParameter("pipelines", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branches", "branch name")). Param(webservice.PathParameter("branches", "branch name")).
Returns(http.StatusOK, RespOK, []devops.SonarStatus{}). Returns(http.StatusOK, RespOK, []devops.SonarStatus{}).
Writes([]devops.SonarStatus{})) Writes([]devops.SonarStatus{}))
webservice.Route(webservice.DELETE("/devops/{devops}/pipelines/{pipelines}"). webservice.Route(webservice.DELETE("/devops/{devops}/pipelines/{pipelines}").
To(devopsapi.DeleteDevOpsProjectPipelineHandler). To(devopsapi.DeleteDevOpsProjectPipelineHandler).
Doc("delete devops project pipeline"). Doc("Delete devops project pipeline").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("pipelines", "pipeline name"))) Param(webservice.PathParameter("pipelines", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")))
webservice.Route(webservice.POST("/devops/{devops}/credentials"). webservice.Route(webservice.POST("/devops/{devops}/credentials").
To(devopsapi.CreateDevOpsProjectCredentialHandler). To(devopsapi.CreateDevOpsProjectCredentialHandler).
Doc("add project credential pipeline"). Doc("Add project credential pipeline").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Reads(devops.JenkinsCredential{})) Reads(devops.JenkinsCredential{}))
webservice.Route(webservice.PUT("/devops/{devops}/credentials/{credentials}"). webservice.Route(webservice.PUT("/devops/{devops}/credentials/{credentials}").
To(devopsapi.UpdateDevOpsProjectCredentialHandler). To(devopsapi.UpdateDevOpsProjectCredentialHandler).
Doc("update project credential pipeline"). Doc("Update project credential pipeline").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("credentials", "credential's Id")). Param(webservice.PathParameter("credentials", "credential's Id")).
...@@ -199,7 +200,7 @@ func addWebService(c *restful.Container) error { ...@@ -199,7 +200,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{devops}/credentials/{credentials}"). webservice.Route(webservice.GET("/devops/{devops}/credentials/{credentials}").
To(devopsapi.GetDevOpsProjectCredentialHandler). To(devopsapi.GetDevOpsProjectCredentialHandler).
Doc("get project credential pipeline"). Doc("Get project credential pipeline").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("credentials", "credential's Id")). Param(webservice.PathParameter("credentials", "credential's Id")).
...@@ -210,7 +211,7 @@ func addWebService(c *restful.Container) error { ...@@ -210,7 +211,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{devops}/credentials"). webservice.Route(webservice.GET("/devops/{devops}/credentials").
To(devopsapi.GetDevOpsProjectCredentialsHandler). To(devopsapi.GetDevOpsProjectCredentialsHandler).
Doc("get project credential pipeline"). Doc("Get project credential pipeline").
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Param(webservice.PathParameter("devops", "devops project's Id")). Param(webservice.PathParameter("devops", "devops project's Id")).
Param(webservice.PathParameter("credentials", "credential's Id")). Param(webservice.PathParameter("credentials", "credential's Id")).
...@@ -222,9 +223,9 @@ func addWebService(c *restful.Container) error { ...@@ -222,9 +223,9 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}"). webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}").
To(devopsapi.GetPipeline). To(devopsapi.GetPipeline).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get DevOps Pipelines."). Doc("Get a Pipeline Inside a DevOps Project").
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Returns(http.StatusOK, RespOK, devops.Pipeline{}). Returns(http.StatusOK, RespOK, devops.Pipeline{}).
Writes(devops.Pipeline{})) Writes(devops.Pipeline{}))
...@@ -233,16 +234,16 @@ func addWebService(c *restful.Container) error { ...@@ -233,16 +234,16 @@ func addWebService(c *restful.Container) error {
To(devopsapi.SearchPipelines). To(devopsapi.SearchPipelines).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Search DevOps resource."). Doc("Search DevOps resource.").
Param(webservice.QueryParameter("q", "query pipelines"). Param(webservice.QueryParameter("q", "query pipelines, condition for filtering.").
Required(false). Required(false).
DataFormat("q=%s")). DataFormat("q=%s")).
Param(webservice.QueryParameter("filter", "filter resource"). Param(webservice.QueryParameter("filter", "Filter some types of jobs. e.g. no-folder,will not get a job of type folder").
Required(false). Required(false).
DataFormat("filter=%s")). DataFormat("filter=%s")).
Param(webservice.QueryParameter("start", "start page"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(false). Required(false).
DataFormat("start=%d")). DataFormat("start=%d")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(false). Required(false).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.Pipeline{}). Returns(http.StatusOK, RespOK, []devops.Pipeline{}).
...@@ -253,15 +254,15 @@ func addWebService(c *restful.Container) error { ...@@ -253,15 +254,15 @@ func addWebService(c *restful.Container) error {
To(devopsapi.SearchPipelineRuns). To(devopsapi.SearchPipelineRuns).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Search DevOps Pipelines runs in branch."). Doc("Search DevOps Pipelines runs in branch.").
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.QueryParameter("start", "start page"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(false). Required(false).
DataFormat("start=%d")). DataFormat("start=%d")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(false). Required(false).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Param(webservice.QueryParameter("branch", "branch "). Param(webservice.QueryParameter("branch", "the name of branch, same as repository brnach, will be filter by branch.").
Required(false). Required(false).
DataFormat("branch=%s")). DataFormat("branch=%s")).
Returns(http.StatusOK, RespOK, []devops.BranchPipelineRun{}). Returns(http.StatusOK, RespOK, []devops.BranchPipelineRun{}).
...@@ -271,12 +272,12 @@ func addWebService(c *restful.Container) error { ...@@ -271,12 +272,12 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}/runs/{runId}"). webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}/runs/{runId}").
To(devopsapi.GetBranchPipelineRun). To(devopsapi.GetBranchPipelineRun).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get DevOps Pipelines run in branch."). Doc("Get all runs in a branch").
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("start", "start"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(false). Required(false).
DataFormat("start=%d")). DataFormat("start=%d")).
Returns(http.StatusOK, RespOK, devops.BranchPipelineRun{}). Returns(http.StatusOK, RespOK, devops.BranchPipelineRun{}).
...@@ -286,12 +287,12 @@ func addWebService(c *restful.Container) error { ...@@ -286,12 +287,12 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}/runs/{runId}/nodes"). webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}/runs/{runId}/nodes").
To(devopsapi.GetPipelineRunNodesbyBranch). To(devopsapi.GetPipelineRunNodesbyBranch).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get node on DevOps Pipelines run."). Doc("Get MultiBranch Pipeline run nodes.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("limit", "limit"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(false). Required(false).
DataFormat("limit=%d"). DataFormat("limit=%d").
DefaultValue("limit=10000")). DefaultValue("limit=10000")).
...@@ -304,13 +305,13 @@ func addWebService(c *restful.Container) error { ...@@ -304,13 +305,13 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipelines step log."). Doc("Get pipelines step log.").
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.PathParameter("nodeId", "pipeline runs node id")). Param(webservice.PathParameter("nodeId", "pipeline node id, the one node in pipeline.")).
Param(webservice.PathParameter("stepId", "pipeline runs step id")). Param(webservice.PathParameter("stepId", "pipeline step id, the one step in pipeline.")).
Param(webservice.QueryParameter("start", "start"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(true). Required(true).
DataFormat("start=%d"). DataFormat("start=%d").
DefaultValue("start=0"))) DefaultValue("start=0")))
...@@ -321,12 +322,12 @@ func addWebService(c *restful.Container) error { ...@@ -321,12 +322,12 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipelines step log."). Doc("Get pipelines step log.").
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.PathParameter("nodeId", "pipeline runs node id")). Param(webservice.PathParameter("nodeId", "pipeline node id, the one node in pipeline.")).
Param(webservice.PathParameter("stepId", "pipeline runs step id")). Param(webservice.PathParameter("stepId", "pipeline step id, the one step in pipeline.")).
Param(webservice.QueryParameter("start", "start"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(true). Required(true).
DataFormat("start=%d"). DataFormat("start=%d").
DefaultValue("start=0"))) DefaultValue("start=0")))
...@@ -336,7 +337,7 @@ func addWebService(c *restful.Container) error { ...@@ -336,7 +337,7 @@ func addWebService(c *restful.Container) error {
To(devopsapi.Validate). To(devopsapi.Validate).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Validate Github personal access token."). Doc("Validate Github personal access token.").
Param(webservice.PathParameter("scmId", "SCM id")). Param(webservice.PathParameter("scmId", "the id of SCM.")).
Returns(http.StatusOK, RespOK, devops.Validates{}). Returns(http.StatusOK, RespOK, devops.Validates{}).
Writes(devops.Validates{})) Writes(devops.Validates{}))
...@@ -345,8 +346,8 @@ func addWebService(c *restful.Container) error { ...@@ -345,8 +346,8 @@ func addWebService(c *restful.Container) error {
To(devopsapi.GetSCMOrg). To(devopsapi.GetSCMOrg).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("List organizations of SCM"). Doc("List organizations of SCM").
Param(webservice.PathParameter("scmId", "SCM id")). Param(webservice.PathParameter("scmId", "the id of SCM.")).
Param(webservice.QueryParameter("credentialId", "credential id for SCM"). Param(webservice.QueryParameter("credentialId", "credential id for SCM.").
Required(true). Required(true).
DataFormat("credentialId=%s")). DataFormat("credentialId=%s")).
Returns(http.StatusOK, RespOK, []devops.SCMOrg{}). Returns(http.StatusOK, RespOK, []devops.SCMOrg{}).
...@@ -358,14 +359,14 @@ func addWebService(c *restful.Container) error { ...@@ -358,14 +359,14 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get SCM repositories in an organization"). Doc("Get SCM repositories in an organization").
Param(webservice.PathParameter("scmId", "SCM id")). Param(webservice.PathParameter("scmId", "SCM id")).
Param(webservice.PathParameter("organizationId", "organization Id, such as github username")). Param(webservice.PathParameter("organizationId", "organization Id, such as github username.")).
Param(webservice.QueryParameter("credentialId", "credential id for SCM"). Param(webservice.QueryParameter("credentialId", "credential id for SCM.").
Required(true). Required(true).
DataFormat("credentialId=%s")). DataFormat("credentialId=%s")).
Param(webservice.QueryParameter("pageNumber", "page number"). Param(webservice.QueryParameter("pageNumber", "the number of page.").
Required(true). Required(true).
DataFormat("pageNumber=%d")). DataFormat("pageNumber=%d")).
Param(webservice.QueryParameter("pageSize", "page size"). Param(webservice.QueryParameter("pageSize", "the size of page.").
Required(true). Required(true).
DataFormat("pageSize=%d")). DataFormat("pageSize=%d")).
Returns(http.StatusOK, RespOK, []devops.OrgRepo{}). Returns(http.StatusOK, RespOK, []devops.OrgRepo{}).
...@@ -376,15 +377,15 @@ func addWebService(c *restful.Container) error { ...@@ -376,15 +377,15 @@ func addWebService(c *restful.Container) error {
To(devopsapi.StopBranchPipeline). To(devopsapi.StopBranchPipeline).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Stop pipeline in running"). Doc("Stop pipeline in running").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("blocking", "stop and between each retries will sleep"). Param(webservice.QueryParameter("blocking", "stop and between each retries will sleep.").
Required(false). Required(false).
DataFormat("blocking=%t"). DataFormat("blocking=%t").
DefaultValue("blocking=false")). DefaultValue("blocking=false")).
Param(webservice.QueryParameter("timeOutInSecs", "the time of stop and between each retries sleep"). Param(webservice.QueryParameter("timeOutInSecs", "the time of stop and between each retries sleep.").
Required(false). Required(false).
DataFormat("timeOutInSecs=%d"). DataFormat("timeOutInSecs=%d").
DefaultValue("timeOutInSecs=10")). DefaultValue("timeOutInSecs=10")).
...@@ -396,14 +397,14 @@ func addWebService(c *restful.Container) error { ...@@ -396,14 +397,14 @@ func addWebService(c *restful.Container) error {
To(devopsapi.StopPipeline). To(devopsapi.StopPipeline).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Stop pipeline in running"). Doc("Stop pipeline in running").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("blocking", "stop and between each retries will sleep"). Param(webservice.QueryParameter("blocking", "stop and between each retries will sleep.").
Required(false). Required(false).
DataFormat("blocking=%t"). DataFormat("blocking=%t").
DefaultValue("blocking=false")). DefaultValue("blocking=false")).
Param(webservice.QueryParameter("timeOutInSecs", "the time of stop and between each retries sleep"). Param(webservice.QueryParameter("timeOutInSecs", "the time of stop and between each retries sleep.").
Required(false). Required(false).
DataFormat("timeOutInSecs=%d"). DataFormat("timeOutInSecs=%d").
DefaultValue("timeOutInSecs=10")). DefaultValue("timeOutInSecs=10")).
...@@ -415,10 +416,10 @@ func addWebService(c *restful.Container) error { ...@@ -415,10 +416,10 @@ func addWebService(c *restful.Container) error {
To(devopsapi.ReplayBranchPipeline). To(devopsapi.ReplayBranchPipeline).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Replay pipeline"). Doc("Replay pipeline").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Returns(http.StatusOK, RespOK, devops.ReplayPipe{}). Returns(http.StatusOK, RespOK, devops.ReplayPipe{}).
Writes(devops.ReplayPipe{})) Writes(devops.ReplayPipe{}))
...@@ -427,9 +428,9 @@ func addWebService(c *restful.Container) error { ...@@ -427,9 +428,9 @@ func addWebService(c *restful.Container) error {
To(devopsapi.ReplayPipeline). To(devopsapi.ReplayPipeline).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Replay pipeline"). Doc("Replay pipeline").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Returns(http.StatusOK, RespOK, devops.ReplayPipe{}). Returns(http.StatusOK, RespOK, devops.ReplayPipe{}).
Writes(devops.ReplayPipe{})) Writes(devops.ReplayPipe{}))
...@@ -439,11 +440,11 @@ func addWebService(c *restful.Container) error { ...@@ -439,11 +440,11 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get Pipelines run log."). Doc("Get Pipelines run log.").
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("start", "start"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(true). Required(true).
DataFormat("start=%d"). DataFormat("start=%d").
DefaultValue("start=0"))) DefaultValue("start=0")))
...@@ -454,10 +455,10 @@ func addWebService(c *restful.Container) error { ...@@ -454,10 +455,10 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get Pipelines run log."). Doc("Get Pipelines run log.").
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("start", "start"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(true). Required(true).
DataFormat("start=%d"). DataFormat("start=%d").
DefaultValue("start=0"))) DefaultValue("start=0")))
...@@ -467,14 +468,14 @@ func addWebService(c *restful.Container) error { ...@@ -467,14 +468,14 @@ func addWebService(c *restful.Container) error {
To(devopsapi.GetBranchArtifacts). To(devopsapi.GetBranchArtifacts).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipeline artifacts."). Doc("Get pipeline artifacts.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("start", "start page"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(false). Required(false).
DataFormat("start=%d")). DataFormat("start=%d")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(false). Required(false).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, "The filed of \"Url\" in response can download artifacts", []devops.Artifacts{}). Returns(http.StatusOK, "The filed of \"Url\" in response can download artifacts", []devops.Artifacts{}).
...@@ -485,13 +486,13 @@ func addWebService(c *restful.Container) error { ...@@ -485,13 +486,13 @@ func addWebService(c *restful.Container) error {
To(devopsapi.GetArtifacts). To(devopsapi.GetArtifacts).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipeline artifacts."). Doc("Get pipeline artifacts.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("start", "start page"). Param(webservice.QueryParameter("start", "the count of item start.").
Required(false). Required(false).
DataFormat("start=%d")). DataFormat("start=%d")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(false). Required(false).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, "The filed of \"Url\" in response can download artifacts", []devops.Artifacts{}). Returns(http.StatusOK, "The filed of \"Url\" in response can download artifacts", []devops.Artifacts{}).
...@@ -501,16 +502,16 @@ func addWebService(c *restful.Container) error { ...@@ -501,16 +502,16 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches"). webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches").
To(devopsapi.GetPipeBranch). To(devopsapi.GetPipeBranch).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipeline of branch."). Doc("Get MultiBranch pipeline branches.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.QueryParameter("filter", "filter remote"). Param(webservice.QueryParameter("filter", "filter remote scm. e.g. origin").
Required(true). Required(true).
DataFormat("filter=%s")). DataFormat("filter=%s")).
Param(webservice.QueryParameter("start", "start"). Param(webservice.QueryParameter("start", "the count of branches start.").
Required(true). Required(true).
DataFormat("start=%d")). DataFormat("start=%d")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of branches limit.").
Required(true). Required(true).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.PipeBranch{}). Returns(http.StatusOK, RespOK, []devops.PipeBranch{}).
...@@ -523,12 +524,12 @@ func addWebService(c *restful.Container) error { ...@@ -523,12 +524,12 @@ func addWebService(c *restful.Container) error {
Doc("Pauses pipeline execution and allows the user to interact and control the flow of the build."). Doc("Pauses pipeline execution and allows the user to interact and control the flow of the build.").
Reads(devops.CheckPlayload{}). Reads(devops.CheckPlayload{}).
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.PathParameter("nodeId", "pipeline node id")). Param(webservice.PathParameter("nodeId", "pipeline node id, the one node in pipeline.")).
Param(webservice.PathParameter("stepId", "pipeline step id"))) Param(webservice.PathParameter("stepId", "pipeline step id, the one step in pipeline.")))
// match /blue/rest/organizations/jenkins/pipelines/{projectName}/pipelines/{pipelineName}/runs/{runId}/nodes/{nodeId}/steps/{stepId} // match /blue/rest/organizations/jenkins/pipelines/{projectName}/pipelines/{pipelineName}/runs/{runId}/nodes/{nodeId}/steps/{stepId}
webservice.Route(webservice.POST("/devops/{projectName}/pipelines/{pipelineName}/runs/{runId}/nodes/{nodeId}/steps/{stepId}"). webservice.Route(webservice.POST("/devops/{projectName}/pipelines/{pipelineName}/runs/{runId}/nodes/{nodeId}/steps/{stepId}").
...@@ -537,10 +538,10 @@ func addWebService(c *restful.Container) error { ...@@ -537,10 +538,10 @@ func addWebService(c *restful.Container) error {
Doc("Pauses pipeline execution and allows the user to interact and control the flow of the build."). Doc("Pauses pipeline execution and allows the user to interact and control the flow of the build.").
Reads(devops.CheckPlayload{}). Reads(devops.CheckPlayload{}).
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.PathParameter("nodeId", "pipeline node id")). Param(webservice.PathParameter("nodeId", "pipeline node id, the one node in pipeline.")).
Param(webservice.PathParameter("stepId", "pipeline step id"))) Param(webservice.PathParameter("stepId", "pipeline step id")))
// match /job/project-8QnvykoJw4wZ/job/test-1/indexing/consoleText // match /job/project-8QnvykoJw4wZ/job/test-1/indexing/consoleText
...@@ -549,8 +550,8 @@ func addWebService(c *restful.Container) error { ...@@ -549,8 +550,8 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get index console log."). Doc("Get index console log.").
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name"))) Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")))
// match /job/{projectName}/job/{pipelineName}/build?delay=0 // match /job/{projectName}/job/{pipelineName}/build?delay=0
webservice.Route(webservice.POST("/devops/{projectName}/pipelines/{pipelineName}/scan"). webservice.Route(webservice.POST("/devops/{projectName}/pipelines/{pipelineName}/scan").
...@@ -558,10 +559,10 @@ func addWebService(c *restful.Container) error { ...@@ -558,10 +559,10 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Start a build."). Doc("Start a build.").
Produces("text/html; charset=utf-8"). Produces("text/html; charset=utf-8").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.QueryParameter("delay", "delay time"). Param(webservice.QueryParameter("delay", "will be delay time to scan.").
Required(true). Required(false).
DataFormat("delay=%d"))) DataFormat("delay=%d")))
// match /blue/rest/organizations/jenkins/pipelines/{projectName}/{pipelineName}/branches/{}/runs/ // match /blue/rest/organizations/jenkins/pipelines/{projectName}/{pipelineName}/branches/{}/runs/
...@@ -570,9 +571,9 @@ func addWebService(c *restful.Container) error { ...@@ -570,9 +571,9 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Run pipeline."). Doc("Run pipeline.").
Reads(devops.RunPayload{}). Reads(devops.RunPayload{}).
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Returns(http.StatusOK, RespOK, devops.QueuedBlueRun{}). Returns(http.StatusOK, RespOK, devops.QueuedBlueRun{}).
Writes(devops.QueuedBlueRun{})) Writes(devops.QueuedBlueRun{}))
...@@ -582,8 +583,8 @@ func addWebService(c *restful.Container) error { ...@@ -582,8 +583,8 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Run pipeline."). Doc("Run pipeline.").
Reads(devops.RunPayload{}). Reads(devops.RunPayload{}).
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Returns(http.StatusOK, RespOK, devops.QueuedBlueRun{}). Returns(http.StatusOK, RespOK, devops.QueuedBlueRun{}).
Writes(devops.QueuedBlueRun{})) Writes(devops.QueuedBlueRun{}))
...@@ -592,12 +593,12 @@ func addWebService(c *restful.Container) error { ...@@ -592,12 +593,12 @@ func addWebService(c *restful.Container) error {
To(devopsapi.GetBranchStepsStatus). To(devopsapi.GetBranchStepsStatus).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipeline steps status."). Doc("Get pipeline steps status.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline run name")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.PathParameter("nodeId", "pipeline node id")). Param(webservice.PathParameter("nodeId", "pipeline node id, the one node in pipeline.")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(true). Required(true).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.QueuedBlueRun{}). Returns(http.StatusOK, RespOK, []devops.QueuedBlueRun{}).
...@@ -608,11 +609,11 @@ func addWebService(c *restful.Container) error { ...@@ -608,11 +609,11 @@ func addWebService(c *restful.Container) error {
To(devopsapi.GetStepsStatus). To(devopsapi.GetStepsStatus).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipeline steps status."). Doc("Get pipeline steps status.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline run name")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.PathParameter("nodeId", "pipeline node id")). Param(webservice.PathParameter("nodeId", "pipeline node id, the one node in pipeline.")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(true). Required(true).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.QueuedBlueRun{}). Returns(http.StatusOK, RespOK, []devops.QueuedBlueRun{}).
...@@ -622,7 +623,7 @@ func addWebService(c *restful.Container) error { ...@@ -622,7 +623,7 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/crumbissuer"). webservice.Route(webservice.GET("/devops/crumbissuer").
To(devopsapi.GetCrumb). To(devopsapi.GetCrumb).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get crumb"). Doc("Get crumb issuer. A CrumbIssuer represents an algorithm to generate a nonce value, known as a crumb, to counter cross site request forgery exploits. Crumbs are typically hashes incorporating information that uniquely identifies an agent that sends a request, along with a guarded secret so that the crumb value cannot be forged by a third party.").
Returns(http.StatusOK, RespOK, devops.Crumb{}). Returns(http.StatusOK, RespOK, devops.Crumb{}).
Writes(devops.Crumb{})) Writes(devops.Crumb{}))
...@@ -643,7 +644,7 @@ func addWebService(c *restful.Container) error { ...@@ -643,7 +644,7 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Produces("application/json", "charset=utf-8"). Produces("application/json", "charset=utf-8").
Doc("Check cron script compile."). Doc("Check cron script compile.").
Param(webservice.QueryParameter("value", "cpec value"). Param(webservice.QueryParameter("value", "string of cron script.").
Required(true). Required(true).
DataFormat("value=%s")). DataFormat("value=%s")).
Returns(http.StatusOK, RespOK, []devops.QueuedBlueRun{}). Returns(http.StatusOK, RespOK, []devops.QueuedBlueRun{}).
...@@ -655,9 +656,9 @@ func addWebService(c *restful.Container) error { ...@@ -655,9 +656,9 @@ func addWebService(c *restful.Container) error {
To(devopsapi.GetPipelineRun). To(devopsapi.GetPipelineRun).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get run pipeline in project."). Doc("Get run pipeline in project.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline run id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Returns(http.StatusOK, RespOK, devops.PipelineRun{}). Returns(http.StatusOK, RespOK, devops.PipelineRun{}).
Writes(devops.PipelineRun{})) Writes(devops.PipelineRun{}))
...@@ -665,10 +666,10 @@ func addWebService(c *restful.Container) error { ...@@ -665,10 +666,10 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}"). webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}").
To(devopsapi.GetBranchPipeline). To(devopsapi.GetBranchPipeline).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get Pipeline run in branch."). Doc("Get Pipeline run by branch.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach")).
Returns(http.StatusOK, RespOK, devops.BranchPipeline{}). Returns(http.StatusOK, RespOK, devops.BranchPipeline{}).
Writes(devops.BranchPipeline{})) Writes(devops.BranchPipeline{}))
...@@ -677,10 +678,10 @@ func addWebService(c *restful.Container) error { ...@@ -677,10 +678,10 @@ func addWebService(c *restful.Container) error {
To(devopsapi.GetPipelineRunNodes). To(devopsapi.GetPipelineRunNodes).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get Pipeline run nodes."). Doc("Get Pipeline run nodes.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline run id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit").
Required(false). Required(false).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.PipelineRunNodes{}). Returns(http.StatusOK, RespOK, []devops.PipelineRunNodes{}).
...@@ -690,13 +691,13 @@ func addWebService(c *restful.Container) error { ...@@ -690,13 +691,13 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}/runs/{runId}/nodes/{nodeId}/steps"). webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}/runs/{runId}/nodes/{nodeId}/steps").
To(devopsapi.GetBranchNodeSteps). To(devopsapi.GetBranchNodeSteps).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get steps in node."). Doc("Get steps in node by branch.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline run id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.PathParameter("nodeId", "pipeline node id")). Param(webservice.PathParameter("nodeId", "pipeline node id, the one node in pipeline.")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(false). Required(false).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.NodeSteps{}). Returns(http.StatusOK, RespOK, []devops.NodeSteps{}).
...@@ -707,11 +708,11 @@ func addWebService(c *restful.Container) error { ...@@ -707,11 +708,11 @@ func addWebService(c *restful.Container) error {
To(devopsapi.GetNodeSteps). To(devopsapi.GetNodeSteps).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get steps in node."). Doc("Get steps in node.").
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("projectName", "the name of devops project")).
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("runId", "pipeline run id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build")).
Param(webservice.PathParameter("nodeId", "pipeline node id")). Param(webservice.PathParameter("nodeId", "pipeline node id, the one node in pipeline.")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(false). Required(false).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.NodeSteps{}). Returns(http.StatusOK, RespOK, []devops.NodeSteps{}).
...@@ -723,9 +724,9 @@ func addWebService(c *restful.Container) error { ...@@ -723,9 +724,9 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Consumes("application/x-www-form-urlencoded"). Consumes("application/x-www-form-urlencoded").
Produces("application/json", "charset=utf-8"). Produces("application/json", "charset=utf-8").
Doc("Json to Jenkinsfile."). Doc("Convert json to jenkinsfile format. Usually the frontend uses json to edit jenkinsfile").
Reads(devops.ReqJson{}). Reads(devops.ReqJson{}).
Returns(http.StatusOK, RespOK, devops.NodeSteps{}). Returns(http.StatusOK, RespOK, devops.ResJenkinsfile{}).
Writes(devops.ResJenkinsfile{})) Writes(devops.ResJenkinsfile{}))
// match /pipeline-model-converter/toJson // match /pipeline-model-converter/toJson
...@@ -734,7 +735,7 @@ func addWebService(c *restful.Container) error { ...@@ -734,7 +735,7 @@ func addWebService(c *restful.Container) error {
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Consumes("application/x-www-form-urlencoded"). Consumes("application/x-www-form-urlencoded").
Produces("application/json", "charset=utf-8"). Produces("application/json", "charset=utf-8").
Doc("Jenkinsfile to Json."). Doc("Convert jenkinsfile to json format. Usually the frontend uses json to edit jenkinsfile").
Reads(devops.ReqJenkinsfile{}). Reads(devops.ReqJenkinsfile{}).
Returns(http.StatusOK, RespOK, devops.ResJson{}). Returns(http.StatusOK, RespOK, devops.ResJson{}).
Writes(devops.ResJson{})) Writes(devops.ResJson{}))
...@@ -743,9 +744,9 @@ func addWebService(c *restful.Container) error { ...@@ -743,9 +744,9 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/notifycommit"). webservice.Route(webservice.GET("/devops/notifycommit").
To(devopsapi.GetNotifyCommit). To(devopsapi.GetNotifyCommit).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get Notify Commit by GET HTTP method."). Doc("Get notification commit by HTTP GET method.").
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.QueryParameter("url", "the url for webhook to push."). Param(webservice.QueryParameter("url", "url of git scm").
Required(true). Required(true).
DataFormat("url=%s"))) DataFormat("url=%s")))
...@@ -753,10 +754,10 @@ func addWebService(c *restful.Container) error { ...@@ -753,10 +754,10 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.POST("/devops/notifycommit"). webservice.Route(webservice.POST("/devops/notifycommit").
To(devopsapi.GetNotifyCommit). To(devopsapi.GetNotifyCommit).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get Notify Commit by POST HTTP method."). Doc("Get notify commit by HTTP POST method.").
Consumes("application/json"). Consumes("application/json").
Produces("text/plain; charset=utf-8"). Produces("text/plain; charset=utf-8").
Param(webservice.QueryParameter("url", "the url for webhook to push."). Param(webservice.QueryParameter("url", "url of git scm").
Required(true). Required(true).
DataFormat("url=%s"))) DataFormat("url=%s")))
...@@ -769,12 +770,12 @@ func addWebService(c *restful.Container) error { ...@@ -769,12 +770,12 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}/runs/{runId}/nodesdetail"). webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/branches/{branchName}/runs/{runId}/nodesdetail").
To(devopsapi.GetBranchNodesDetail). To(devopsapi.GetBranchNodesDetail).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipeline nodes stages detail"). Doc("Gives steps details inside a pipeline node by branch. For a Stage, the steps will include all the steps defined inside the stage.").
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(true). Required(true).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.NodesDetail{}). Returns(http.StatusOK, RespOK, []devops.NodesDetail{}).
...@@ -784,12 +785,12 @@ func addWebService(c *restful.Container) error { ...@@ -784,12 +785,12 @@ func addWebService(c *restful.Container) error {
webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/runs/{runId}/nodesdetail"). webservice.Route(webservice.GET("/devops/{projectName}/pipelines/{pipelineName}/runs/{runId}/nodesdetail").
To(devopsapi.GetNodesDetail). To(devopsapi.GetNodesDetail).
Metadata(restfulspec.KeyOpenAPITags, tags). Metadata(restfulspec.KeyOpenAPITags, tags).
Doc("Get pipeline nodes stages detail"). Doc("Gives steps details inside a pipeline node. For a Stage, the steps will include all the steps defined inside the stage.").
Param(webservice.PathParameter("pipelineName", "pipeline name")). Param(webservice.PathParameter("projectName", "the name of devops project.")).
Param(webservice.PathParameter("projectName", "devops project name")). Param(webservice.PathParameter("pipelineName", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")).
Param(webservice.PathParameter("branchName", "pipeline branch name")). Param(webservice.PathParameter("branchName", "the name of branch, same as repository brnach.")).
Param(webservice.PathParameter("runId", "pipeline runs id")). Param(webservice.PathParameter("runId", "pipeline run id, the unique id for a pipeline once build.")).
Param(webservice.QueryParameter("limit", "limit count"). Param(webservice.QueryParameter("limit", "the count of item limit.").
Required(true). Required(true).
DataFormat("limit=%d")). DataFormat("limit=%d")).
Returns(http.StatusOK, RespOK, []devops.NodesDetail{}). Returns(http.StatusOK, RespOK, []devops.NodesDetail{}).
......
...@@ -25,13 +25,20 @@ import ( ...@@ -25,13 +25,20 @@ import (
"kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1" "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
"kubesphere.io/kubesphere/pkg/apiserver/runtime" "kubesphere.io/kubesphere/pkg/apiserver/runtime"
"kubesphere.io/kubesphere/pkg/apiserver/tenant" "kubesphere.io/kubesphere/pkg/apiserver/tenant"
"kubesphere.io/kubesphere/pkg/models/devops"
"kubesphere.io/kubesphere/pkg/params"
"kubesphere.io/kubesphere/pkg/errors" "kubesphere.io/kubesphere/pkg/errors"
"kubesphere.io/kubesphere/pkg/models" "kubesphere.io/kubesphere/pkg/models"
"kubesphere.io/kubesphere/pkg/models/devops"
"net/http" "net/http"
) )
const GroupName = "tenant.kubesphere.io" const (
GroupName = "tenant.kubesphere.io"
RespOK = "ok"
)
var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
...@@ -103,13 +110,27 @@ func addWebService(c *restful.Container) error { ...@@ -103,13 +110,27 @@ func addWebService(c *restful.Container) error {
ws.Route(ws.GET("/workspaces/{workspace}/devops"). ws.Route(ws.GET("/workspaces/{workspace}/devops").
To(tenant.ListDevopsProjects). To(tenant.ListDevopsProjects).
Param(ws.PathParameter("workspace", "workspace name")). Param(ws.PathParameter("workspace", "workspace name")).
Param(ws.QueryParameter(params.PagingParam, "page").
Required(false).
DataFormat("limit=%d,page=%d").
DefaultValue("limit=10,page=1")).
Param(ws.QueryParameter(params.ConditionsParam, "query conditions").
Required(false).
DataFormat("key=%s,key~%s")).
Doc("List devops projects for the current user"). Doc("List devops projects for the current user").
Returns(http.StatusOK, ok, models.PageableResponse{}).
Metadata(restfulspec.KeyOpenAPITags, tags)) Metadata(restfulspec.KeyOpenAPITags, tags))
ws.Route(ws.GET("/workspaces/{workspace}/members/{username}/devops"). ws.Route(ws.GET("/workspaces/{workspace}/members/{username}/devops").
To(tenant.ListDevopsProjects). To(tenant.ListDevopsProjects).
Param(ws.PathParameter("workspace", "workspace name")). Param(ws.PathParameter("workspace", "workspace name")).
Param(ws.PathParameter("username", "workspace member's username")). Param(ws.PathParameter("username", "workspace member's username")).
Param(ws.QueryParameter(params.PagingParam, "page").
Required(false).
DataFormat("limit=%d,page=%d").
DefaultValue("limit=10,page=1")).
Param(ws.QueryParameter(params.ConditionsParam, "query conditions").
Required(false).
DataFormat("key=%s,key~%s")).
Returns(http.StatusOK, ok, models.PageableResponse{}). Returns(http.StatusOK, ok, models.PageableResponse{}).
Doc("List the devops projects for the workspace member"). Doc("List the devops projects for the workspace member").
Metadata(restfulspec.KeyOpenAPITags, tags)) Metadata(restfulspec.KeyOpenAPITags, tags))
...@@ -117,13 +138,15 @@ func addWebService(c *restful.Container) error { ...@@ -117,13 +138,15 @@ func addWebService(c *restful.Container) error {
To(tenant.CreateDevopsProject). To(tenant.CreateDevopsProject).
Param(ws.PathParameter("workspace", "workspace name")). Param(ws.PathParameter("workspace", "workspace name")).
Doc("Create devops project"). Doc("Create devops project").
Returns(http.StatusOK, ok, devops.DevOpsProject{}). Reads(devops.DevOpsProject{}).
Returns(http.StatusOK, RespOK, devops.DevOpsProject{}).
Metadata(restfulspec.KeyOpenAPITags, tags)) Metadata(restfulspec.KeyOpenAPITags, tags))
ws.Route(ws.DELETE("/workspaces/{workspace}/devops/{id}"). ws.Route(ws.DELETE("/workspaces/{workspace}/devops/{id}").
To(tenant.DeleteDevopsProject). To(tenant.DeleteDevopsProject).
Param(ws.PathParameter("workspace", "workspace name")). Param(ws.PathParameter("workspace", "workspace name")).
Param(ws.PathParameter("id", "devops project id")).
Doc("Delete devops project"). Doc("Delete devops project").
Returns(http.StatusOK, ok, errors.Error{}). Returns(http.StatusOK, RespOK, devops.DevOpsProject{}).
Metadata(restfulspec.KeyOpenAPITags, tags)) Metadata(restfulspec.KeyOpenAPITags, tags))
ws.Route(ws.GET("/logging"). ws.Route(ws.GET("/logging").
To(tenant.LogQuery). To(tenant.LogQuery).
......
...@@ -87,18 +87,18 @@ type CredentialResponse struct { ...@@ -87,18 +87,18 @@ type CredentialResponse struct {
TypeName string `json:"typeName"` TypeName string `json:"typeName"`
DisplayName string `json:"displayName"` DisplayName string `json:"displayName"`
Fingerprint *struct { Fingerprint *struct {
FileName string `json:"fileName,omitempty"` FileName string `json:"file_name,omitempty" description:"credential's display name and description"`
Hash string `json:"hash,omitempty"` Hash string `json:"hash,omitempty" description:"credential's hash'"`
Usage []*struct { Usage []*struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"jenkins pipeline full name"`
Ranges struct { Ranges struct {
Ranges []*struct { Ranges []*struct {
Start int `json:"start,omitempty"` Start int `json:"start,omitempty" description:"start build number"`
End int `json:"end,omitempty"` End int `json:"end,omitempty" description:"end build number"`
} `json:"ranges,omitempty"` } `json:"ranges,omitempty"`
} `json:"ranges,omitempty"` } `json:"ranges,omitempty" description:"all build num using credential"`
} `json:"usage,omitempty"` } `json:"usage,omitempty" description:"all usage of credential"`
} `json:"fingerprint,omitempty"` } `json:"fingerprint,omitempty" description:"usage of credential"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
Domain string `json:"domain"` Domain string `json:"domain"`
} }
......
...@@ -79,8 +79,8 @@ const ( ...@@ -79,8 +79,8 @@ const (
) )
type Role struct { type Role struct {
Name string `json:"name"` Name string `json:"name" description:"role's name'"`
Description string `json:"description"` Description string `json:"description" description:"role 's description'"`
} }
var DefaultRoles = []*Role{ var DefaultRoles = []*Role{
......
...@@ -19,7 +19,7 @@ package devops ...@@ -19,7 +19,7 @@ package devops
// GetPipeline & SearchPipelines // GetPipeline & SearchPipelines
type Pipeline struct { type Pipeline struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability." `
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -49,44 +49,44 @@ type Pipeline struct { ...@@ -49,44 +49,44 @@ type Pipeline struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"queue,omitempty"` } `json:"queue,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource."`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions."`
Disabled interface{} `json:"disabled,omitempty"` Disabled interface{} `json:"disabled,omitempty" description:"disable or not"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
FullDisplayName string `json:"fullDisplayName,omitempty"` FullDisplayName string `json:"fullDisplayName,omitempty" description:"full display name"`
FullName string `json:"fullName,omitempty"` FullName string `json:"fullName,omitempty" description:"full name"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization name"`
Parameters interface{} `json:"parameters,omitempty"` Parameters interface{} `json:"parameters,omitempty" description:"parameters of pipeline"`
Permissions struct { Permissions struct {
Create bool `json:"create,omitempty"` Create bool `json:"create,omitempty" description:"create action"`
Configure bool `json:"configure,omitempty"` Configure bool `json:"configure,omitempty" description:"configure action"`
Read bool `json:"read,omitempty"` Read bool `json:"read,omitempty" description:"read action"`
Start bool `json:"start,omitempty"` Start bool `json:"start,omitempty" description:"start action"`
Stop bool `json:"stop,omitempty"` Stop bool `json:"stop,omitempty" description:"stop action"`
} `json:"permissions,omitempty"` } `json:"permissions,omitempty" description:"permissions"`
EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time, unit is millis"`
NumberOfFolders int `json:"numberOfFolders,omitempty"` NumberOfFolders int `json:"numberOfFolders,omitempty" description:"number of folders"`
NumberOfPipelines int `json:"numberOfPipelines,omitempty"` NumberOfPipelines int `json:"numberOfPipelines,omitempty" description:"number of pipelines"`
PipelineFolderNames []interface{} `json:"pipelineFolderNames,omitempty"` PipelineFolderNames []interface{} `json:"pipelineFolderNames,omitempty" description:"pipeline folder names"`
WeatherScore int `json:"weatherScore,omitempty"` WeatherScore int `json:"weatherScore,omitempty" description:"the score to description the result of pipeline"`
BranchNames []string `json:"branchNames,omitempty"` BranchNames []string `json:"branchNames,omitempty" description:"branch names"`
NumberOfFailingBranches int `json:"numberOfFailingBranches,omitempty"` NumberOfFailingBranches int `json:"numberOfFailingBranches,omitempty" description:"number of failing branches"`
NumberOfFailingPullRequests int `json:"numberOfFailingPullRequests,omitempty"` NumberOfFailingPullRequests int `json:"numberOfFailingPullRequests,omitempty" description:"number of failing pull requests"`
NumberOfSuccessfulBranches int `json:"numberOfSuccessfulBranches,omitempty"` NumberOfSuccessfulBranches int `json:"numberOfSuccessfulBranches,omitempty" description:"number of successful pull requests"`
NumberOfSuccessfulPullRequests int `json:"numberOfSuccessfulPullRequests,omitempty"` NumberOfSuccessfulPullRequests int `json:"numberOfSuccessfulPullRequests,omitempty" description:"number of successful pull requests"`
ScmSource struct { ScmSource struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
APIURL interface{} `json:"apiUrl,omitempty"` APIURL interface{} `json:"apiUrl,omitempty" description:"api url"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"scm source id"`
} `json:"scmSource,omitempty"` } `json:"scmSource,omitempty"`
TotalNumberOfBranches int `json:"totalNumberOfBranches,omitempty"` TotalNumberOfBranches int `json:"totalNumberOfBranches,omitempty" description:"total number of branches"`
TotalNumberOfPullRequests int `json:"totalNumberOfPullRequests,omitempty"` TotalNumberOfPullRequests int `json:"totalNumberOfPullRequests,omitempty" description:"total number of pull requests"`
} }
// GetPipeBranchRun & SearchPipelineRuns // GetPipeBranchRun & SearchPipelineRuns
type BranchPipelineRun struct { type BranchPipelineRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
PrevRun struct { PrevRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -132,45 +132,45 @@ type BranchPipelineRun struct { ...@@ -132,45 +132,45 @@ type BranchPipelineRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"nextRun,omitempty"` } `json:"nextRun,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty"` ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Causes []struct { Causes []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ShortDescription string `json:"shortDescription,omitempty"` ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
UserID string `json:"userId,omitempty"` UserID string `json:"userId,omitempty" description:"user id"`
UserName string `json:"userName,omitempty"` UserName string `json:"userName,omitempty" description:"user name"`
} `json:"causes,omitempty"` } `json:"causes,omitempty"`
ChangeSet []interface{} `json:"changeSet,omitempty"` ChangeSet []interface{} `json:"changeSet,omitempty" description:"change set"`
Description interface{} `json:"description,omitempty"` Description interface{} `json:"description,omitempty" description:"description of resource"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
EnQueueTime string `json:"enQueueTime,omitempty"` EnQueueTime string `json:"enQueueTime,omitempty" description:"enqueue time"`
EndTime string `json:"endTime,omitempty"` EndTime string `json:"endTime,omitempty" description:"end time"`
EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Name interface{} `json:"name,omitempty"` Name interface{} `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization name"`
Pipeline string `json:"pipeline,omitempty"` Pipeline string `json:"pipeline,omitempty" description:"pipeline name"`
Replayable bool `json:"replayable,omitempty"` Replayable bool `json:"replayable,omitempty" description:"replayable or not"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
RunSummary string `json:"runSummary,omitempty"` RunSummary string `json:"runSummary,omitempty" description:"pipeline run summary"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"pipeline run state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"source type"`
Branch struct { Branch struct {
IsPrimary bool `json:"isPrimary,omitempty"` IsPrimary bool `json:"isPrimary,omitempty" description:"primary or not"`
Issues []interface{} `json:"issues,omitempty"` Issues []interface{} `json:"issues,omitempty" description:"issues"`
URL string `json:"url,omitempty"` URL string `json:"url,omitempty" description:"url"`
} `json:"branch,omitempty"` } `json:"branch,omitempty"`
CommitID string `json:"commitId,omitempty"` CommitID string `json:"commitId,omitempty" description:"commit id"`
CommitURL interface{} `json:"commitUrl,omitempty"` CommitURL interface{} `json:"commitUrl,omitempty" description:"commit url "`
PullRequest interface{} `json:"pullRequest,omitempty"` PullRequest interface{} `json:"pullRequest,omitempty" description:"pull request"`
} }
// GetBranchPipeRunNodes // GetBranchPipeRunNodes
type BranchPipelineRunNodes struct { type BranchPipelineRunNodes struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -184,27 +184,27 @@ type BranchPipelineRunNodes struct { ...@@ -184,27 +184,27 @@ type BranchPipelineRunNodes struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"steps,omitempty"` } `json:"steps,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
DisplayDescription interface{} `json:"displayDescription,omitempty"` DisplayDescription interface{} `json:"displayDescription,omitempty" description:"display description"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Input interface{} `json:"input,omitempty"` Input interface{} `json:"input,omitempty" description:"input"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"statue"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"source type"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Edges []struct { Edges []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"source type"`
} `json:"edges,omitempty"` } `json:"edges,omitempty"`
FirstParent interface{} `json:"firstParent,omitempty"` FirstParent interface{} `json:"firstParent,omitempty" description:"first parent resource"`
Restartable bool `json:"restartable,omitempty"` Restartable bool `json:"restartable,omitempty" description:"restartable or not"`
Steps []struct { Steps []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -224,87 +224,87 @@ type BranchPipelineRunNodes struct { ...@@ -224,87 +224,87 @@ type BranchPipelineRunNodes struct {
} `json:"self,omitempty"` } `json:"self,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty"`
URLName string `json:"urlName,omitempty"` URLName string `json:"urlName,omitempty"`
} `json:"actions,omitempty"` } `json:"actions,omitempty" description:"references the reachable path to this resource"`
DisplayDescription interface{} `json:"displayDescription,omitempty"` DisplayDescription interface{} `json:"displayDescription,omitempty" description:"display description"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Input interface{} `json:"input,omitempty"` Input interface{} `json:"input,omitempty" description:"input"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"source state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"source type"`
} `json:"steps,omitempty"` } `json:"steps,omitempty"`
} }
// Validate // Validate
type Validates struct { type Validates struct {
CredentialID string `json:"credentialId,omitempty"` CredentialID string `json:"credentialId,omitempty" description:"credential id"`
} }
// GetSCMOrg // GetSCMOrg
type SCMOrg struct { type SCMOrg struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Repositories struct { Repositories struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty" description:"url in api"`
} `json:"repositories,omitempty"` } `json:"repositories,omitempty"`
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty" description:"self url in api"`
} `json:"self,omitempty"` } `json:"self,omitempty" description:"scm org self info"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Avatar string `json:"avatar,omitempty"` Avatar string `json:"avatar,omitempty" description:"avatar url"`
JenkinsOrganizationPipeline bool `json:"jenkinsOrganizationPipeline,omitempty"` JenkinsOrganizationPipeline bool `json:"jenkinsOrganizationPipeline,omitempty" description:"jenkins organization pipeline"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"org name "`
} }
// GetOrgRepo // GetOrgRepo
type OrgRepo struct { type OrgRepo struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"self,omitempty"` } `json:"self,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Repositories struct { Repositories struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"self,omitempty"` } `json:"self,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Items []struct { Items []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"self,omitempty"` } `json:"self,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
DefaultBranch string `json:"defaultBranch,omitempty"` DefaultBranch string `json:"defaultBranch,omitempty" description:"default branch"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty" description:"description"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Permissions struct { Permissions struct {
Admin bool `json:"admin,omitempty"` Admin bool `json:"admin,omitempty" description:"admin"`
Push bool `json:"push,omitempty"` Push bool `json:"push,omitempty" description:"push action"`
Pull bool `json:"pull,omitempty"` Pull bool `json:"pull,omitempty" description:"pull action"`
} `json:"permissions,omitempty"` } `json:"permissions,omitempty"`
Private bool `json:"private,omitempty"` Private bool `json:"private,omitempty" description:"private"`
FullName string `json:"fullName,omitempty"` FullName string `json:"fullName,omitempty" description:"full name"`
} `json:"items,omitempty"` } `json:"items,omitempty"`
LastPage interface{} `json:"lastPage,omitempty"` LastPage interface{} `json:"lastPage,omitempty" description:"last page"`
NextPage interface{} `json:"nextPage,omitempty"` NextPage interface{} `json:"nextPage,omitempty" description:"next page"`
PageSize int `json:"pageSize,omitempty"` PageSize int `json:"pageSize,omitempty" description:"page size"`
} `json:"repositories,omitempty"` } `json:"repositories,omitempty"`
} }
// StopPipeline // StopPipeline
type StopPipe struct { type StopPipe struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Parent struct { Parent struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -342,43 +342,43 @@ type StopPipe struct { ...@@ -342,43 +342,43 @@ type StopPipe struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"artifacts,omitempty"` } `json:"artifacts,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions."`
ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty"` ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Causes []struct { Causes []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ShortDescription string `json:"shortDescription,omitempty"` ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
} `json:"causes,omitempty"` } `json:"causes,omitempty"`
ChangeSet []interface{} `json:"changeSet,omitempty"` ChangeSet []interface{} `json:"changeSet,omitempty" description:"change set"`
Description interface{} `json:"description,omitempty"` Description interface{} `json:"description,omitempty" description:"description"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
EnQueueTime string `json:"enQueueTime,omitempty"` EnQueueTime string `json:"enQueueTime,omitempty" description:"enqueue time"`
EndTime string `json:"endTime,omitempty"` EndTime string `json:"endTime,omitempty" description:"end time"`
EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Name interface{} `json:"name,omitempty"` Name interface{} `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization"`
Pipeline string `json:"pipeline,omitempty"` Pipeline string `json:"pipeline,omitempty" description:"pipeline"`
Replayable bool `json:"replayable,omitempty"` Replayable bool `json:"replayable,omitempty" description:"replayable or not"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
RunSummary string `json:"runSummary,omitempty"` RunSummary string `json:"runSummary,omitempty" description:"pipeline run summary"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"State"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
Branch struct { Branch struct {
IsPrimary bool `json:"isPrimary,omitempty"` IsPrimary bool `json:"isPrimary,omitempty" description:"primary or not"`
Issues []interface{} `json:"issues,omitempty"` Issues []interface{} `json:"issues,omitempty" description:"issues"`
URL string `json:"url,omitempty"` URL string `json:"url,omitempty" description:"url"`
} `json:"branch,omitempty"` } `json:"branch,omitempty"`
CommitID string `json:"commitId,omitempty"` CommitID string `json:"commitId,omitempty" description:"commit id"`
CommitURL interface{} `json:"commitUrl,omitempty"` CommitURL interface{} `json:"commitUrl,omitempty" description:"commit url"`
PullRequest interface{} `json:"pullRequest,omitempty"` PullRequest interface{} `json:"pullRequest,omitempty" description:"pull request"`
} }
// ReplayPipeline // ReplayPipeline
type ReplayPipe struct { type ReplayPipe struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Parent struct { Parent struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -408,55 +408,55 @@ type ReplayPipe struct { ...@@ -408,55 +408,55 @@ type ReplayPipe struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"artifacts,omitempty"` } `json:"artifacts,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions."`
ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty"` ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
CauseOfBlockage string `json:"causeOfBlockage,omitempty"` CauseOfBlockage string `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Causes []struct { Causes []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ShortDescription string `json:"shortDescription,omitempty"` ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
UserID string `json:"userId,omitempty"` UserID string `json:"userId,omitempty" description:"user id"`
UserName string `json:"userName,omitempty"` UserName string `json:"userName,omitempty" description:"user name"`
} `json:"causes,omitempty"` } `json:"causes,omitempty"`
ChangeSet []interface{} `json:"changeSet,omitempty"` ChangeSet []interface{} `json:"changeSet,omitempty" description:"change set"`
Description interface{} `json:"description,omitempty"` Description interface{} `json:"description,omitempty" description:"description"`
DurationInMillis interface{} `json:"durationInMillis,omitempty"` DurationInMillis interface{} `json:"durationInMillis,omitempty" description:"duration time in millis"`
EnQueueTime interface{} `json:"enQueueTime,omitempty"` EnQueueTime interface{} `json:"enQueueTime,omitempty" description:"enqueue time"`
EndTime interface{} `json:"endTime,omitempty"` EndTime interface{} `json:"endTime,omitempty" description:"end time"`
EstimatedDurationInMillis interface{} `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis interface{} `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time, unit is millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Name interface{} `json:"name,omitempty"` Name interface{} `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization"`
Pipeline string `json:"pipeline,omitempty"` Pipeline string `json:"pipeline,omitempty" description:"pipeline"`
Replayable bool `json:"replayable,omitempty"` Replayable bool `json:"replayable,omitempty" description:"replayable or not"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
RunSummary interface{} `json:"runSummary,omitempty"` RunSummary interface{} `json:"runSummary,omitempty" description:"pipeline run summary"`
StartTime interface{} `json:"startTime,omitempty"` StartTime interface{} `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
QueueID string `json:"queueId,omitempty"` QueueID string `json:"queueId,omitempty" description:"queue id"`
} }
// GetArtifacts // GetArtifacts
type Artifacts struct { type Artifacts struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"self,omitempty"` } `json:"self,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Downloadable bool `json:"downloadable,omitempty"` Downloadable bool `json:"downloadable,omitempty" description:"downloadable or not"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Path string `json:"path,omitempty"` Path string `json:"path,omitempty" description:"path"`
Size int `json:"size,omitempty"` Size int `json:"size,omitempty" description:"size"`
URL string `json:"url,omitempty"` // The url for Download artifacts URL string `json:"url,omitempty" description:"The url for Download artifacts"`
} }
// GetPipeBranch // GetPipeBranch
type PipeBranch struct { type PipeBranch struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -482,15 +482,15 @@ type PipeBranch struct { ...@@ -482,15 +482,15 @@ type PipeBranch struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"queue,omitempty"` } `json:"queue,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions."`
Disabled bool `json:"disabled,omitempty"` Disabled bool `json:"disabled,omitempty" description:"disable or not"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time, unit is millis"`
FullDisplayName string `json:"fullDisplayName,omitempty"` FullDisplayName string `json:"fullDisplayName,omitempty" description:"full display name"`
FullName string `json:"fullName,omitempty"` FullName string `json:"fullName,omitempty" description:"full name"`
LatestRun struct { LatestRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
PrevRun struct { PrevRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -524,69 +524,69 @@ type PipeBranch struct { ...@@ -524,69 +524,69 @@ type PipeBranch struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"artifacts,omitempty"` } `json:"artifacts,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
ArtifactsZipFile string `json:"artifactsZipFile,omitempty"` ArtifactsZipFile string `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Causes []struct { Causes []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ShortDescription string `json:"shortDescription,omitempty"` ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
} `json:"causes,omitempty"` } `json:"causes,omitempty"`
ChangeSet []interface{} `json:"changeSet,omitempty"` ChangeSet []interface{} `json:"changeSet,omitempty" description:"change set"`
Description interface{} `json:"description,omitempty"` Description interface{} `json:"description,omitempty" description:"description"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
EnQueueTime string `json:"enQueueTime,omitempty"` EnQueueTime string `json:"enQueueTime,omitempty" description:"enqueue time"`
EndTime string `json:"endTime,omitempty"` EndTime string `json:"endTime,omitempty" description:"end time"`
EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Name interface{} `json:"name,omitempty"` Name interface{} `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization"`
Pipeline string `json:"pipeline,omitempty"` Pipeline string `json:"pipeline,omitempty" description:"pipeline"`
Replayable bool `json:"replayable,omitempty"` Replayable bool `json:"replayable,omitempty" description:"replayable or not"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
RunSummary string `json:"runSummary,omitempty"` RunSummary string `json:"runSummary,omitempty" description:"pipeline run summary"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start run"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
} `json:"latestRun,omitempty"` } `json:"latestRun,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization"`
Parameters []struct { Parameters []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
DefaultParameterValue struct { DefaultParameterValue struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Value string `json:"value,omitempty"` Value string `json:"value,omitempty" description:"value"`
} `json:"defaultParameterValue,omitempty"` } `json:"defaultParameterValue,omitempty"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty" description:"description"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
} `json:"parameters,omitempty"` } `json:"parameters,omitempty"`
Permissions struct { Permissions struct {
Create bool `json:"create,omitempty"` Create bool `json:"create,omitempty" description:"create action"`
Configure bool `json:"configure,omitempty"` Configure bool `json:"configure,omitempty" description:"configure action"`
Read bool `json:"read,omitempty"` Read bool `json:"read,omitempty" description:"read action"`
Start bool `json:"start,omitempty"` Start bool `json:"start,omitempty" description:"start action"`
Stop bool `json:"stop,omitempty"` Stop bool `json:"stop,omitempty" description:"stop action"`
} `json:"permissions,omitempty"` } `json:"permissions,omitempty"`
WeatherScore int `json:"weatherScore,omitempty"` WeatherScore int `json:"weatherScore,omitempty" description:"the score to description the result of pipeline"`
Branch struct { Branch struct {
IsPrimary bool `json:"isPrimary,omitempty"` IsPrimary bool `json:"isPrimary,omitempty" description:"primary or not"`
Issues []interface{} `json:"issues,omitempty"` Issues []interface{} `json:"issues,omitempty" description:"issues"`
URL string `json:"url,omitempty"` URL string `json:"url,omitempty" description:"url"`
} `json:"branch,omitempty"` } `json:"branch,omitempty"`
} }
// RunPipeline // RunPipeline
type RunPayload struct { type RunPayload struct {
Parameters []struct { Parameters []struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Value string `json:"value,omitempty"` Value string `json:"value,omitempty" description:"value"`
} `json:"parameters,omitempty"` } `json:"parameters,omitempty"`
} }
type QueuedBlueRun struct { type QueuedBlueRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Parent struct { Parent struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -616,38 +616,38 @@ type QueuedBlueRun struct { ...@@ -616,38 +616,38 @@ type QueuedBlueRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"artifacts,omitempty"` } `json:"artifacts,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty"` ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
CauseOfBlockage string `json:"causeOfBlockage,omitempty"` CauseOfBlockage string `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Causes []struct { Causes []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ShortDescription string `json:"shortDescription,omitempty"` ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
UserID string `json:"userId,omitempty"` UserID string `json:"userId,omitempty" description:"user id"`
UserName string `json:"userName,omitempty"` UserName string `json:"userName,omitempty" description:"user name"`
} `json:"causes,omitempty"` } `json:"causes,omitempty"`
ChangeSet []interface{} `json:"changeSet,omitempty"` ChangeSet []interface{} `json:"changeSet,omitempty" description:"change set"`
Description interface{} `json:"description,omitempty"` Description interface{} `json:"description,omitempty" description:"description"`
DurationInMillis interface{} `json:"durationInMillis,omitempty"` DurationInMillis interface{} `json:"durationInMillis,omitempty" description:"duration time in millis"`
EnQueueTime interface{} `json:"enQueueTime,omitempty"` EnQueueTime interface{} `json:"enQueueTime,omitempty" description:"enqueue time"`
EndTime interface{} `json:"endTime,omitempty"` EndTime interface{} `json:"endTime,omitempty" description:"end time"`
EstimatedDurationInMillis interface{} `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis interface{} `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Name interface{} `json:"name,omitempty"` Name interface{} `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization"`
Pipeline string `json:"pipeline,omitempty"` Pipeline string `json:"pipeline,omitempty" description:"pipeline"`
Replayable bool `json:"replayable,omitempty"` Replayable bool `json:"replayable,omitempty" description:"replayable or not"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
RunSummary interface{} `json:"runSummary,omitempty"` RunSummary interface{} `json:"runSummary,omitempty" description:"pipeline run summary"`
StartTime interface{} `json:"startTime,omitempty"` StartTime interface{} `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
QueueID string `json:"queueId,omitempty"` QueueID string `json:"queueId,omitempty" description:"queue id"`
} }
// GetNodeStatus // GetNodeStatus
type NodeStatus struct { type NodeStatus struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:""`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -661,27 +661,27 @@ type NodeStatus struct { ...@@ -661,27 +661,27 @@ type NodeStatus struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"steps,omitempty"` } `json:"steps,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
DisplayDescription interface{} `json:"displayDescription,omitempty"` DisplayDescription interface{} `json:"displayDescription,omitempty" description:"display description"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Input interface{} `json:"input,omitempty"` Input interface{} `json:"input,omitempty" description:"input"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Edges []struct { Edges []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
} `json:"edges,omitempty"` } `json:"edges,omitempty"`
FirstParent interface{} `json:"firstParent,omitempty"` FirstParent interface{} `json:"firstParent,omitempty" description:"first parent"`
Restartable bool `json:"restartable,omitempty"` Restartable bool `json:"restartable,omitempty" description:"restartable or not"`
Steps []struct { Steps []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -691,63 +691,63 @@ type NodeStatus struct { ...@@ -691,63 +691,63 @@ type NodeStatus struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"actions,omitempty"` } `json:"actions,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []struct { Actions []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"references the reachable path to this resource"`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"self,omitempty"` } `json:"self,omitempty" description:""`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
URLName string `json:"urlName,omitempty"` URLName string `json:"urlName,omitempty" description:"url name"`
} `json:"actions,omitempty"` } `json:"actions,omitempty"`
DisplayDescription interface{} `json:"displayDescription,omitempty"` DisplayDescription interface{} `json:"displayDescription,omitempty" description:"display description"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Input interface{} `json:"input,omitempty"` Input interface{} `json:"input,omitempty" description:"input"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
} `json:"steps,omitempty"` } `json:"steps,omitempty"`
} }
// CheckPipeline // CheckPipeline
type CheckPlayload struct { type CheckPlayload struct {
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Parameters []struct { Parameters []struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Value string `json:"value,omitempty"` Value string `json:"value,omitempty" description:"value"`
} `json:"parameters,omitempty"` } `json:"parameters,omitempty"`
Abort bool `json:"abort,omitempty"` Abort bool `json:"abort,omitempty" description:"abort or not"`
} }
// Getcrumb // Getcrumb
type Crumb struct { type Crumb struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Crumb string `json:"crumb,omitempty"` Crumb string `json:"crumb,omitempty" description:"crumb data"`
CrumbRequestField string `json:"crumbRequestField,omitempty"` CrumbRequestField string `json:"crumbRequestField,omitempty" description:"crumb request field"`
} }
// CheckScriptCompile // CheckScriptCompile
type CheckScript struct { type CheckScript struct {
Column int `json:"column,omitempty"` Column int `json:"column,omitempty" description:"column e.g. 0"`
Line int `json:"line,omitempty"` Line int `json:"line,omitempty" description:"line e.g. 0"`
Message string `json:"message,omitempty"` Message string `json:"message,omitempty" description:"message e.g. success"`
Status string `json:"status,omitempty"` Status string `json:"status,omitempty" description:"status e.g. success"`
} }
// CheckCron // CheckCron
type CheckCronRes struct { type CheckCronRes struct {
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
Message string `json:"message,omitempty"` Message string `json:"message,omitempty" description:"message"`
} }
// GetPipelineRun // GetPipelineRun
type PipelineRun struct { type PipelineRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
PrevRun struct { PrevRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -789,41 +789,41 @@ type PipelineRun struct { ...@@ -789,41 +789,41 @@ type PipelineRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"artifacts,omitempty"` } `json:"artifacts,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty"` ArtifactsZipFile interface{} `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Causes []struct { Causes []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ShortDescription string `json:"shortDescription,omitempty"` ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
UserID string `json:"userId,omitempty"` UserID string `json:"userId,omitempty" description:"user id"`
UserName string `json:"userName,omitempty"` UserName string `json:"userName,omitempty" description:"user name"`
} `json:"causes,omitempty"` } `json:"causes,omitempty"`
ChangeSet []interface{} `json:"changeSet,omitempty"` ChangeSet []interface{} `json:"changeSet,omitempty" description:"change set"`
Description interface{} `json:"description,omitempty"` Description interface{} `json:"description,omitempty" description:"description"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
EnQueueTime string `json:"enQueueTime,omitempty"` EnQueueTime string `json:"enQueueTime,omitempty" description:"enqueue time"`
EndTime string `json:"endTime,omitempty"` EndTime string `json:"endTime,omitempty" description:"end time"`
EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Name interface{} `json:"name,omitempty"` Name interface{} `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization"`
Pipeline string `json:"pipeline,omitempty"` Pipeline string `json:"pipeline,omitempty" description:"pipeline"`
Replayable bool `json:"replayable,omitempty"` Replayable bool `json:"replayable,omitempty" description:"replayable or not"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
RunSummary string `json:"runSummary,omitempty"` RunSummary string `json:"runSummary,omitempty" description:"pipeline run summary"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
Branch interface{} `json:"branch,omitempty"` Branch interface{} `json:"branch,omitempty" description:"branch"`
CommitID interface{} `json:"commitId,omitempty"` CommitID interface{} `json:"commitId,omitempty" description:"commit id"`
CommitURL interface{} `json:"commitUrl,omitempty"` CommitURL interface{} `json:"commitUrl,omitempty" description:"commit url"`
PullRequest interface{} `json:"pullRequest,omitempty"` PullRequest interface{} `json:"pullRequest,omitempty" description:"pull request"`
} }
// GetBranchPipeRun // GetBranchPipeRun
type BranchPipeline struct { type BranchPipeline struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -849,15 +849,15 @@ type BranchPipeline struct { ...@@ -849,15 +849,15 @@ type BranchPipeline struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"queue,omitempty"` } `json:"queue,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
Disabled bool `json:"disabled,omitempty"` Disabled bool `json:"disabled,omitempty" description:"disable or not"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
FullDisplayName string `json:"fullDisplayName,omitempty"` FullDisplayName string `json:"fullDisplayName,omitempty" description:"full display name"`
FullName string `json:"fullName,omitempty"` FullName string `json:"fullName,omitempty" description:"full name"`
LatestRun struct { LatestRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
PrevRun struct { PrevRun struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -891,64 +891,64 @@ type BranchPipeline struct { ...@@ -891,64 +891,64 @@ type BranchPipeline struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"artifacts,omitempty"` } `json:"artifacts,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
ArtifactsZipFile string `json:"artifactsZipFile,omitempty"` ArtifactsZipFile string `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Causes []struct { Causes []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ShortDescription string `json:"shortDescription,omitempty"` ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
UserID string `json:"userId,omitempty"` UserID string `json:"userId,omitempty" description:"user id"`
UserName string `json:"userName,omitempty"` UserName string `json:"userName,omitempty" description:"user name"`
} `json:"causes,omitempty"` } `json:"causes,omitempty"`
ChangeSet []interface{} `json:"changeSet,omitempty"` ChangeSet []interface{} `json:"changeSet,omitempty" description:"change set"`
Description interface{} `json:"description,omitempty"` Description interface{} `json:"description,omitempty" description:"description"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
EnQueueTime string `json:"enQueueTime,omitempty"` EnQueueTime string `json:"enQueueTime,omitempty" description:"enqueue time"`
EndTime string `json:"endTime,omitempty"` EndTime string `json:"endTime,omitempty" description:"end time"`
EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty"` EstimatedDurationInMillis int `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Name interface{} `json:"name,omitempty"` Name interface{} `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization"`
Pipeline string `json:"pipeline,omitempty"` Pipeline string `json:"pipeline,omitempty" description:"pipeline"`
Replayable bool `json:"replayable,omitempty"` Replayable bool `json:"replayable,omitempty" description:"Replayable or not"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
RunSummary string `json:"runSummary,omitempty"` RunSummary string `json:"runSummary,omitempty" description:"pipeline run summary"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
} `json:"latestRun,omitempty"` } `json:"latestRun,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Organization string `json:"organization,omitempty"` Organization string `json:"organization,omitempty" description:"organization"`
Parameters []struct { Parameters []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
DefaultParameterValue struct { DefaultParameterValue struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Value string `json:"value,omitempty"` Value string `json:"value,omitempty" description:"value"`
} `json:"defaultParameterValue,omitempty"` } `json:"defaultParameterValue,omitempty" description:""`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty" description:"description"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"name"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
} `json:"parameters,omitempty"` } `json:"parameters,omitempty"`
Permissions struct { Permissions struct {
Create bool `json:"create,omitempty"` Create bool `json:"create,omitempty" description:"create action"`
Configure bool `json:"configure,omitempty"` Configure bool `json:"configure,omitempty" description:"configure action"`
Read bool `json:"read,omitempty"` Read bool `json:"read,omitempty" description:"read action"`
Start bool `json:"start,omitempty"` Start bool `json:"start,omitempty" description:"start action"`
Stop bool `json:"stop,omitempty"` Stop bool `json:"stop,omitempty" description:"stop action"`
} `json:"permissions,omitempty"` } `json:"permissions,omitempty"`
WeatherScore int `json:"weatherScore,omitempty"` WeatherScore int `json:"weatherScore,omitempty" description:"the score to description the result of pipeline"`
Branch struct { Branch struct {
IsPrimary bool `json:"isPrimary,omitempty"` IsPrimary bool `json:"isPrimary,omitempty" description:"primary or not"`
Issues []interface{} `json:"issues,omitempty"` Issues []interface{} `json:"issues,omitempty" description:"issues"`
URL string `json:"url,omitempty"` URL string `json:"url,omitempty" description:"url"`
} `json:"branch,omitempty"` } `json:"branch,omitempty"`
} }
// GetPipelineRunNodes // GetPipelineRunNodes
type PipelineRunNodes struct { type PipelineRunNodes struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -962,26 +962,26 @@ type PipelineRunNodes struct { ...@@ -962,26 +962,26 @@ type PipelineRunNodes struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"steps,omitempty"` } `json:"steps,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
DisplayDescription interface{} `json:"displayDescription,omitempty"` DisplayDescription interface{} `json:"displayDescription,omitempty" description:"display description"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in mullis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Input interface{} `json:"input,omitempty"` Input interface{} `json:"input,omitempty" description:"input"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause 0f blockage"`
Edges []interface{} `json:"edges,omitempty"` Edges []interface{} `json:"edges,omitempty" description:"edges"`
FirstParent interface{} `json:"firstParent,omitempty"` FirstParent interface{} `json:"firstParent,omitempty" description:"first parent"`
Restartable bool `json:"restartable,omitempty"` Restartable bool `json:"restartable,omitempty" description:"restartable or not"`
} }
// GetNodeSteps // GetNodeSteps
type NodeSteps struct { type NodeSteps struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -991,69 +991,69 @@ type NodeSteps struct { ...@@ -991,69 +991,69 @@ type NodeSteps struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"actions,omitempty"` } `json:"actions,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []struct { Actions []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"self,omitempty"` } `json:"self,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
URLName string `json:"urlName,omitempty"` URLName string `json:"urlName,omitempty" description:"url name"`
} `json:"actions,omitempty"` } `json:"actions,omitempty"`
DisplayDescription string `json:"displayDescription,omitempty"` DisplayDescription string `json:"displayDescription,omitempty" description:"display description"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in mullis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Input interface{} `json:"input,omitempty"` Input interface{} `json:"input,omitempty" description:"input"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start times"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"state"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
} }
// CheckScriptCompile // CheckScriptCompile
type ReqScript struct { type ReqScript struct {
Value string `json:"value,omitempty"` Value string `json:"value,omitempty" description:"check value"`
} }
// ToJenkinsfile requests // ToJenkinsfile requests
type ReqJson struct { type ReqJson struct {
Json string `json:"json,omitempty"` Json string `json:"json,omitempty" description:"json data"`
} }
// ToJenkinsfile response // ToJenkinsfile response
type ResJenkinsfile struct { type ResJenkinsfile struct {
Status string `json:"status,omitempty"` Status string `json:"status,omitempty" description:"status"`
Data struct { Data struct {
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
Jenkinsfile string `json:"jenkinsfile,omitempty"` Jenkinsfile string `json:"jenkinsfile,omitempty" description:"jenkinsfile"`
Errors []struct { Errors []struct {
Location []string `json:"location,omitempty"` Location []string `json:"location,omitempty" description:"err location"`
Error string `json:"error,omitempty"` Error string `json:"error,omitempty" description:"error message"`
} `json:"errors,omitempty"` } `json:"errors,omitempty"`
} `json:"data,omitempty"` } `json:"data,omitempty"`
} }
type ReqJenkinsfile struct { type ReqJenkinsfile struct {
Jenkinsfile string `json:"jenkinsfile,omitempty"` Jenkinsfile string `json:"jenkinsfile,omitempty" description:"jenkinsfile"`
} }
type ResJson struct { type ResJson struct {
Status string `json:"status,omitempty"` Status string `json:"status,omitempty" description:"status"`
Data struct { Data struct {
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
JSON struct { JSON struct {
Pipeline struct { Pipeline struct {
Stages []interface{} `json:"stages,omitempty"` Stages []interface{} `json:"stages,omitempty" description:"stages"`
Agent struct { Agent struct {
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
Arguments []struct { Arguments []struct {
Key string `json:"key,omitempty"` Key string `json:"key,omitempty" description:"key"`
Value struct { Value struct {
IsLiteral bool `json:"isLiteral,omitempty"` IsLiteral bool `json:"isLiteral,omitempty" description:"is literal or not"`
Value string `json:"value,omitempty"` Value string `json:"value,omitempty" description:"value"`
} `json:"value,omitempty"` } `json:"value,omitempty"`
} `json:"arguments,omitempty"` } `json:"arguments,omitempty"`
} `json:"agent,omitempty"` } `json:"agent,omitempty"`
...@@ -1063,7 +1063,7 @@ type ResJson struct { ...@@ -1063,7 +1063,7 @@ type ResJson struct {
} }
type NodesDetail struct { type NodesDetail struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
Links struct { Links struct {
Self struct { Self struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
...@@ -1077,29 +1077,29 @@ type NodesDetail struct { ...@@ -1077,29 +1077,29 @@ type NodesDetail struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty"`
Href string `json:"href,omitempty"` Href string `json:"href,omitempty"`
} `json:"steps,omitempty"` } `json:"steps,omitempty"`
} `json:"_links,omitempty"` } `json:"_links,omitempty" description:"references the reachable path to this resource"`
Actions []interface{} `json:"actions,omitempty"` Actions []interface{} `json:"actions,omitempty" description:"the list of actions"`
DisplayDescription interface{} `json:"displayDescription,omitempty"` DisplayDescription interface{} `json:"displayDescription,omitempty" description:"display description"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty" description:"display name"`
DurationInMillis int `json:"durationInMillis,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty" description:"duration time in millis"`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Input interface{} `json:"input,omitempty"` Input interface{} `json:"input,omitempty" description:"input"`
Result string `json:"result,omitempty"` Result string `json:"result,omitempty" description:"result"`
StartTime string `json:"startTime,omitempty"` StartTime string `json:"startTime,omitempty" description:"start time"`
State string `json:"state,omitempty"` State string `json:"state,omitempty" description:"statue"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty"` CauseOfBlockage interface{} `json:"causeOfBlockage,omitempty" description:"cause of blockage"`
Edges []struct { Edges []struct {
Class string `json:"_class,omitempty"` Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability."`
ID string `json:"id,omitempty"` ID string `json:"id,omitempty" description:"id"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty" description:"type"`
} `json:"edges,omitempty"` } `json:"edges,omitempty"`
FirstParent interface{} `json:"firstParent,omitempty"` FirstParent interface{} `json:"firstParent,omitempty" description:"first parent"`
Restartable bool `json:"restartable,omitempty"` Restartable bool `json:"restartable,omitempty" description:"restartable or not"`
Steps []NodeSteps `json:"steps,omitempty"` Steps []NodeSteps `json:"steps,omitempty" description:"steps"`
} }
type NodesStepsIndex struct { type NodesStepsIndex struct {
Id int `json:"id,omitempty"` Id int `json:"id,omitempty" description:"id"`
Steps []NodeSteps `json:"steps,omitempty"` Steps []NodeSteps `json:"steps,omitempty" description:"steps"`
} }
...@@ -21,11 +21,11 @@ const ( ...@@ -21,11 +21,11 @@ const (
) )
type DevOpsProjectMembership struct { type DevOpsProjectMembership struct {
Username string `json:"username"` Username string `json:"username" description:"member's username,username can uniquely identify a user"`
ProjectId string `json:"project_id" db:"project_id"` ProjectId string `json:"project_id" db:"project_id" description:"the devops projects which project membership belongs to"`
Role string `json:"role"` Role string `json:"role" description:"devops project membership's role type. e.g. owner '"`
Status string `json:"status"` Status string `json:"status" description:"Desperated, status of project membership"`
GrantBy string `json:"grand_by,omitempty"` GrantBy string `json:"grand_by,omitempty" description:"Username of the user who assigned the role"`
} }
var DevOpsProjectMembershipColumns = GetColumnsFromStruct(&DevOpsProjectMembership{}) var DevOpsProjectMembershipColumns = GetColumnsFromStruct(&DevOpsProjectMembership{})
......
...@@ -37,15 +37,23 @@ type PageableDevOpsProject struct { ...@@ -37,15 +37,23 @@ type PageableDevOpsProject struct {
} }
type DevOpsProject struct { type DevOpsProject struct {
ProjectId string `json:"project_id" db:"project_id"` ProjectId string `json:"project_id" db:"project_id" description:"ProjectId must be unique within a namespace, it is generated by kubesphere."`
Name string `json:"name"`
Description string `json:"description,omitempty"` Name string `json:"name" description:"DevOps Projects's Name'"`
Creator string `json:"creator"`
CreateTime time.Time `json:"create_time"` Description string `json:"description,omitempty" description:"DevOps Projets's Description, used to describe the DevOps Project'"`
Status string `json:"status"`
Visibility string `json:"visibility,omitempty"` Creator string `json:"creator" description:"Creator's username'"`
Extra string `json:"extra,omitempty"`
Workspace string `json:"workspace"` CreateTime time.Time `json:"create_time" description:"DevOps Project's Creation time'"`
Status string `json:"status" description:"DevOps project's status. e.g. active"`
Visibility string `json:"visibility,omitempty" description:"Desperated Field"`
Extra string `json:"extra,omitempty" description:"Internal Use"`
Workspace string `json:"workspace" description:"The workspace to which the devops project belongs"`
} }
func NewDevOpsProject(name, description, creator, extra, workspace string) *DevOpsProject { func NewDevOpsProject(name, description, creator, extra, workspace string) *DevOpsProject {
......
...@@ -26,50 +26,49 @@ const ( ...@@ -26,50 +26,49 @@ const (
) )
type JenkinsCredential struct { type JenkinsCredential struct {
Id string `json:"id"` Id string `json:"id" description:"id of credential"`
Type string `json:"type"` Type string `json:"type" description:"type of credential,such as ssh/kubeconfig"`
DisplayName string `json:"display_name,omitempty"` DisplayName string `json:"display_name,omitempty" description:"credential's display name'"`
Fingerprint *struct { Fingerprint *struct {
FileName string `json:"file_name,omitempty"` FileName string `json:"file_name,omitempty" description:"credential's display name and description"`
Hash string `json:"hash,omitempty"` Hash string `json:"hash,omitempty" description:"credential's hash'"`
Usage []*struct { Usage []*struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"jenkins pipeline full name"`
Ranges struct { Ranges struct {
Ranges []*struct { Ranges []*struct {
Start int `json:"start,omitempty"` Start int `json:"start,omitempty" description:"start build number"`
End int `json:"end,omitempty"` End int `json:"end,omitempty" description:"end build number"`
} `json:"ranges,omitempty"` } `json:"ranges,omitempty"`
} `json:"ranges,omitempty"` } `json:"ranges,omitempty" description:"all build num using credential"`
} `json:"usage,omitempty"` } `json:"usage,omitempty" description:"all usage of credential"`
} `json:"fingerprint,omitempty"` } `json:"fingerprint,omitempty" description:"usage of credential"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty" description:"credential's description'"`
Domain string `json:"domain,omitempty"` Domain string `json:"domain,omitempty" description:"credential's domain,In ks we only use the default domain, default '_''"`
CreateTime *time.Time `json:"create_time,omitempty"` CreateTime *time.Time `json:"create_time,omitempty" description:"credential's create_time'"`
Creator string `json:"creator,omitempty"` Creator string `json:"creator,omitempty" description:"creator's username"`
UsernamePasswordCredential *UsernamePasswordCredential `json:"username_password,omitempty"` UsernamePasswordCredential *UsernamePasswordCredential `json:"username_password,omitempty" description:"username password credential struct"`
SshCredential *SshCredential `json:"ssh,omitempty"` SshCredential *SshCredential `json:"ssh,omitempty" description:"ssh credential struct"`
SecretTextCredential *SecretTextCredential `json:"secret_text,omitempty"` SecretTextCredential *SecretTextCredential `json:"secret_text,omitempty" description:"secret_text credential struct"`
KubeconfigCredential *KubeconfigCredential `json:"kubeconfig,omitempty"` KubeconfigCredential *KubeconfigCredential `json:"kubeconfig,omitempty" description:"kubeconfig credential struct"`
} }
type UsernamePasswordCredential struct { type UsernamePasswordCredential struct {
Username string `json:"username,omitempty"` Username string `json:"username,omitempty" description:"username of username_password credential"`
Password string `json:"password,omitempty"` Password string `json:"password,omitempty" description:"password of username_password credential"`
} }
type SshCredential struct { type SshCredential struct {
Username string `json:"username,omitempty"` Username string `json:"username,omitempty" description:"username of ssh credential"`
Passphrase string `json:"passphrase,omitempty"` Passphrase string `json:"passphrase,omitempty" description:"passphrase of ssh credential, password of ssh credential"`
PrivateKey string `json:"private_key,omitempty" mapstructure:"private_key"` PrivateKey string `json:"private_key,omitempty" mapstructure:"private_key" description:"private key of ssh credential"`
} }
type SecretTextCredential struct { type SecretTextCredential struct {
Secret string `json:"secret,omitempty"` Secret string `json:"secret,omitempty" description:"secret content of credential"`
Description string `json:"description,omitempty"`
} }
type KubeconfigCredential struct { type KubeconfigCredential struct {
Content string `json:"content,omitempty"` Content string `json:"content,omitempty" description:"content of kubeconfig"`
} }
const ( const (
......
...@@ -205,7 +205,7 @@ func UpdateProjectCredential(projectId, credentialId string, credentialRequest * ...@@ -205,7 +205,7 @@ func UpdateProjectCredential(projectId, credentialId string, credentialRequest *
credentialId, err := jenkinsClient.UpdateSecretTextCredentialInFolder(credentialRequest.Domain, credentialId, err := jenkinsClient.UpdateSecretTextCredentialInFolder(credentialRequest.Domain,
credentialId, credentialId,
credentialRequest.SecretTextCredential.Secret, credentialRequest.SecretTextCredential.Secret,
credentialRequest.SecretTextCredential.Description, credentialRequest.Description,
projectId) projectId)
if err != nil { if err != nil {
glog.Errorf("%+v", err) glog.Errorf("%+v", err)
...@@ -421,17 +421,17 @@ func formatCredentialResponse( ...@@ -421,17 +421,17 @@ func formatCredentialResponse(
response.DisplayName = jenkinsCredentialResponse.DisplayName response.DisplayName = jenkinsCredentialResponse.DisplayName
if jenkinsCredentialResponse.Fingerprint != nil && jenkinsCredentialResponse.Fingerprint.Hash != "" { if jenkinsCredentialResponse.Fingerprint != nil && jenkinsCredentialResponse.Fingerprint.Hash != "" {
response.Fingerprint = &struct { response.Fingerprint = &struct {
FileName string `json:"file_name,omitempty"` FileName string `json:"file_name,omitempty" description:"credential's display name and description"`
Hash string `json:"hash,omitempty"` Hash string `json:"hash,omitempty" description:"credential's hash'"`
Usage []*struct { Usage []*struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty" description:"jenkins pipeline full name"`
Ranges struct { Ranges struct {
Ranges []*struct { Ranges []*struct {
Start int `json:"start,omitempty"` Start int `json:"start,omitempty" description:"start build number"`
End int `json:"end,omitempty"` End int `json:"end,omitempty" description:"end build number"`
} `json:"ranges,omitempty"`
} `json:"ranges,omitempty"` } `json:"ranges,omitempty"`
} `json:"usage,omitempty"` } `json:"ranges,omitempty" description:"all build num using credential"`
} `json:"usage,omitempty" description:"all usage of credential"`
}{} }{}
response.Fingerprint.FileName = jenkinsCredentialResponse.Fingerprint.FileName response.Fingerprint.FileName = jenkinsCredentialResponse.Fingerprint.FileName
response.Fingerprint.Hash = jenkinsCredentialResponse.Fingerprint.Hash response.Fingerprint.Hash = jenkinsCredentialResponse.Fingerprint.Hash
......
...@@ -53,99 +53,99 @@ type SonarStatus struct { ...@@ -53,99 +53,99 @@ type SonarStatus struct {
} }
type ProjectPipeline struct { type ProjectPipeline struct {
Type string `json:"type"` Type string `json:"type" description:"type of devops pipeline, in scm or no scm"`
Pipeline *NoScmPipeline `json:"pipeline,omitempty"` Pipeline *NoScmPipeline `json:"pipeline,omitempty" description:"no scm pipeline structs"`
MultiBranchPipeline *MultiBranchPipeline `json:"multi_branch_pipeline,omitempty"` MultiBranchPipeline *MultiBranchPipeline `json:"multi_branch_pipeline,omitempty" description:"in scm pipeline structs"`
} }
type NoScmPipeline struct { type NoScmPipeline struct {
Name string `json:"name"` Name string `json:"name" description:"name of pipeline"`
Description string `json:"descriptio,omitempty"` Description string `json:"descriptio,omitempty" description:"description of pipeline"`
Discarder *DiscarderProperty `json:"discarder,omitempty"` Discarder *DiscarderProperty `json:"discarder,omitempty" description:"Discarder of pipeline, managing when to drop a pipeline"`
Parameters []*Parameter `json:"parameters,omitempty"` Parameters []*Parameter `json:"parameters,omitempty" description:"Parameters define of pipeline,user could pass param when run pipeline"`
DisableConcurrent bool `json:"disable_concurrent,omitempty" mapstructure:"disable_concurrent"` DisableConcurrent bool `json:"disable_concurrent,omitempty" mapstructure:"disable_concurrent" description:"Whether to prohibit the pipeline from running in parallel"`
TimerTrigger *TimerTrigger `json:"timer_trigger,omitempty" mapstructure:"timer_trigger"` TimerTrigger *TimerTrigger `json:"timer_trigger,omitempty" mapstructure:"timer_trigger" description:"Timer to trigger pipeline run"`
RemoteTrigger *RemoteTrigger `json:"remote_trigger,omitempty" mapstructure:"remote_trigger"` RemoteTrigger *RemoteTrigger `json:"remote_trigger,omitempty" mapstructure:"remote_trigger" description:"Remote api define to trigger pipeline run"`
Jenkinsfile string `json:"jenkinsfile,omitempty"` Jenkinsfile string `json:"jenkinsfile,omitempty" description:"Jenkinsfile's content'"`
} }
type MultiBranchPipeline struct { type MultiBranchPipeline struct {
Name string `json:"name"` Name string `json:"name" description:"name of pipeline"`
Description string `json:"description,omitempty"` Description string `json:"descriptio,omitempty" description:"description of pipeline"`
Discarder *DiscarderProperty `json:"discarder,omitempty"` Discarder *DiscarderProperty `json:"discarder,omitempty" description:"Discarder of pipeline, managing when to drop a pipeline"`
TimerTrigger *TimerTrigger `json:"timer_trigger,omitempty" mapstructure:"timer_trigger"` TimerTrigger *TimerTrigger `json:"timer_trigger,omitempty" mapstructure:"timer_trigger" description:"Timer to trigger pipeline run"`
SourceType string `json:"source_type"` SourceType string `json:"source_type" description:"type of scm, such as github/git/svn"`
GitSource *GitSource `json:"git_source,omitempty"` GitSource *GitSource `json:"git_source,omitempty" description:"git scm define"`
GitHubSource *GithubSource `json:"github_source,omitempty"` GitHubSource *GithubSource `json:"github_source,omitempty" description:"github scm define"`
SvnSource *SvnSource `json:"svn_source,omitempty"` SvnSource *SvnSource `json:"svn_source,omitempty" description:"multi branch svn scm define"`
SingleSvnSource *SingleSvnSource `json:"single_svn_source,omitempty"` SingleSvnSource *SingleSvnSource `json:"single_svn_source,omitempty" description:"single branch svn scm define"`
ScriptPath string `json:"script_path" mapstructure:"script_path"` ScriptPath string `json:"script_path" mapstructure:"script_path" description:"script path in scm"`
} }
type GitSource struct { type GitSource struct {
Url string `json:"url,omitempty" mapstructure:"url"` Url string `json:"url,omitempty" mapstructure:"url" description:"url of git source"`
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id"` CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access git source"`
DiscoverBranches bool `json:"discover_branches,omitempty" mapstructure:"discover_branches"` DiscoverBranches bool `json:"discover_branches,omitempty" mapstructure:"discover_branches" description:"Whether to discover a branch"`
CloneOption *GitCloneOption `json:"git_clone_option,omitempty" mapstructure:"git_clone_option"` CloneOption *GitCloneOption `json:"git_clone_option,omitempty" mapstructure:"git_clone_option" description:"advavced git clone options"`
RegexFilter string `json:"regex_filter,omitempty" mapstructure:"regex_filter"` RegexFilter string `json:"regex_filter,omitempty" mapstructure:"regex_filter" description:"Regex used to match the name of the branch that needs to be run"`
} }
type GithubSource struct { type GithubSource struct {
Owner string `json:"owner,omitempty" mapstructure:"owner"` Owner string `json:"owner,omitempty" mapstructure:"owner" description:"owner of github repo"`
Repo string `json:"repo,omitempty" mapstructure:"repo"` Repo string `json:"repo,omitempty" mapstructure:"repo" description:"repo name of github repo"`
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id"` CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access github source"`
ApiUri string `json:"api_uri,omitempty" mapstructure:"api_uri"` ApiUri string `json:"api_uri,omitempty" mapstructure:"api_uri" description:"The api url can specify the location of the github apiserver.For private cloud configuration"`
DiscoverBranches int `json:"discover_branches,omitempty" mapstructure:"discover_branches"` DiscoverBranches int `json:"discover_branches,omitempty" mapstructure:"discover_branches" description:"Discover branch configuration"`
DiscoverPRFromOrigin int `json:"discover_pr_from_origin,omitempty" mapstructure:"discover_pr_from_origin"` DiscoverPRFromOrigin int `json:"discover_pr_from_origin,omitempty" mapstructure:"discover_pr_from_origin" description:"Discover origin PR configuration"`
DiscoverPRFromForks *GithubDiscoverPRFromForks `json:"discover_pr_from_forks,omitempty" mapstructure:"discover_pr_from_forks"` DiscoverPRFromForks *GithubDiscoverPRFromForks `json:"discover_pr_from_forks,omitempty" mapstructure:"discover_pr_from_forks" description:"Discover fork PR configuration"`
CloneOption *GitCloneOption `json:"git_clone_option,omitempty" mapstructure:"git_clone_option"` CloneOption *GitCloneOption `json:"git_clone_option,omitempty" mapstructure:"git_clone_option" description:"advavced git clone options"`
RegexFilter string `json:"regex_filter,omitempty" mapstructure:"regex_filter"` RegexFilter string `json:"regex_filter,omitempty" mapstructure:"regex_filter" description:"Regex used to match the name of the branch that needs to be run"`
} }
type GitCloneOption struct { type GitCloneOption struct {
Shallow bool `json:"shallow,omitempty" mapstructure:"shallow"` Shallow bool `json:"shallow,omitempty" mapstructure:"shallow" description:"Whether to use git shallow clone"`
Timeout int `json:"timeout,omitempty" mapstructure:"timeout"` Timeout int `json:"timeout,omitempty" mapstructure:"timeout" description:"git clone timeout mins"`
Depth int `json:"depth,omitempty" mapstructure:"depth"` Depth int `json:"depth,omitempty" mapstructure:"depth" description:"git clone depth"`
} }
type SvnSource struct { type SvnSource struct {
Remote string `json:"remote,omitempty"` Remote string `json:"remote,omitempty" description:"remote address url"`
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id"` CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access svn source"`
Includes string `json:"includes,omitempty"` Includes string `json:"includes,omitempty" description:"branches to run pipeline"`
Excludes string `json:"excludes,omitempty"` Excludes string `json:"excludes,omitempty" description:"branches do not run pipeline"`
} }
type SingleSvnSource struct { type SingleSvnSource struct {
Remote string `json:"remote,omitempty"` Remote string `json:"remote,omitempty" description:"remote address url"`
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id"` CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access svn source"`
} }
type GithubDiscoverPRFromForks struct { type GithubDiscoverPRFromForks struct {
Strategy int `json:"strategy,omitempty" mapstructure:"strategy"` Strategy int `json:"strategy,omitempty" mapstructure:"strategy" description:"github discover startegy"`
Trust int `json:"trust,omitempty" mapstructure:"trust"` Trust int `json:"trust,omitempty" mapstructure:"trust" description:"trust user type"`
} }
type DiscarderProperty struct { type DiscarderProperty struct {
DaysToKeep string `json:"days_to_keep,omitempty" mapstructure:"days_to_keep"` DaysToKeep string `json:"days_to_keep,omitempty" mapstructure:"days_to_keep" description:"days to keep pipeline"`
NumToKeep string `json:"num_to_keep,omitempty" mapstructure:"num_to_keep"` NumToKeep string `json:"num_to_keep,omitempty" mapstructure:"num_to_keep" description:"nums to keep pipeline"`
} }
type Parameter struct { type Parameter struct {
Name string `json:"name"` Name string `json:"name" description:"name of param"`
DefaultValue string `json:"default_value,omitempty" mapstructure:"default_value"` DefaultValue string `json:"default_value,omitempty" mapstructure:"default_value" description:"default value of param"`
Type string `json:"type"` Type string `json:"type" description:"type of param"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty" description:"description of pipeline"`
} }
type TimerTrigger struct { type TimerTrigger struct {
// user in no scm job // user in no scm job
Cron string `json:"cron,omitempty"` Cron string `json:"cron,omitempty" description:"jenkins cron script"`
// use in multi-branch job // use in multi-branch job
Interval string `json:"interval,omitempty"` Interval string `json:"interval,omitempty" description:"interval ms"`
} }
type RemoteTrigger struct { type RemoteTrigger struct {
Token string `json:"token,omitempty"` Token string `json:"token,omitempty" description:"remote trigger token"`
} }
func replaceXmlVersion(config, oldVersion, targetVersion string) string { func replaceXmlVersion(config, oldVersion, targetVersion string) string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册