diff --git a/pkg/apis/devops/v1alpha2/register.go b/pkg/apis/devops/v1alpha2/register.go index e3047d5197c9079384d425fd23bed01b80e7176d..c7c0e2f92c78424091c0631f862d6bcbb1878bb1 100644 --- a/pkg/apis/devops/v1alpha2/register.go +++ b/pkg/apis/devops/v1alpha2/register.go @@ -50,34 +50,34 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}"). To(devopsapi.GetDevOpsProjectHandler). - Doc("Get a DevOps Project"). + Doc("Get the specified DevOps Project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Returns(http.StatusOK, RespOK, devops.DevOpsProject{}). Writes(devops.DevOpsProject{})) webservice.Route(webservice.PATCH("/devops/{devops}"). To(devopsapi.UpdateProjectHandler). - Doc("Update a DevOps Project"). + Doc("Update the specified DevOps Project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Reads(devops.DevOpsProject{}). Returns(http.StatusOK, RespOK, devops.DevOpsProject{}). Writes(devops.DevOpsProject{})) webservice.Route(webservice.GET("/devops/{devops}/defaultroles"). To(devopsapi.GetDevOpsProjectDefaultRoles). - Doc("Get DevOps Project Build-in Roles Info"). + Doc("Get the build-in roles info of the specified DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Returns(http.StatusOK, RespOK, []devops.Role{}). Writes([]devops.Role{})) webservice.Route(webservice.GET("/devops/{devops}/members"). To(devopsapi.GetDevOpsProjectMembersHandler). - Doc("Get members of the DevOps Project"). + Doc("Get the members of the specified DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.QueryParameter(params.PagingParam, "page"). Required(false). DataFormat("limit=%d,page=%d"). @@ -90,43 +90,43 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/members/{member}"). To(devopsapi.GetDevOpsProjectMemberHandler). - Doc("Get a member of the DevOps Project"). + Doc("Get the specified member of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("member", "Member's username, e.g. admin")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("member", "member's username, e.g. admin")). Returns(http.StatusOK, RespOK, devops.DevOpsProjectMembership{}). Writes(devops.DevOpsProjectMembership{})) webservice.Route(webservice.POST("/devops/{devops}/members"). To(devopsapi.AddDevOpsProjectMemberHandler). - Doc("Add a member of the DevOps Project"). + Doc("Add a member to the specified DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Returns(http.StatusOK, RespOK, devops.DevOpsProjectMembership{}). Writes(devops.DevOpsProjectMembership{})) webservice.Route(webservice.PATCH("/devops/{devops}/members/{member}"). To(devopsapi.UpdateDevOpsProjectMemberHandler). - Doc("Update a member of the DevOps Project"). + Doc("Update the specified member of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("member", "Member's username, e.g. admin")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("member", "member's username, e.g. admin")). Returns(http.StatusOK, RespOK, devops.DevOpsProjectMembership{}). Reads(devops.DevOpsProjectMembership{}). Writes(devops.DevOpsProjectMembership{})) webservice.Route(webservice.DELETE("/devops/{devops}/members/{member}"). To(devopsapi.DeleteDevOpsProjectMemberHandler). - Doc("Delete a member of the DevOps Project"). + Doc("Delete the specified member of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("member", "Member's username, e.g. admin")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("member", "member's username, e.g. admin")). Writes(devops.DevOpsProjectMembership{})) webservice.Route(webservice.POST("/devops/{devops}/pipelines"). To(devopsapi.CreateDevOpsProjectPipelineHandler). - Doc("Create a DevOps Project pipeline"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Doc("Create a DevOps project pipeline"). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Metadata(restfulspec.KeyOpenAPITags, tags). Returns(http.StatusOK, RespOK, devops.ProjectPipeline{}). Writes(devops.ProjectPipeline{}). @@ -134,43 +134,43 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.PUT("/devops/{devops}/pipelines/{pipeline}"). To(devopsapi.UpdateDevOpsProjectPipelineHandler). - Doc("Update DevOps Project pipeline"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("pipeline", "The name of pipeline, e.g. sample-pipeline")). + Doc("Update the specified pipeline of the DevOps project"). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("pipeline", "the name of pipeline, e.g. sample-pipeline")). Metadata(restfulspec.KeyOpenAPITags, tags). Writes(devops.ProjectPipeline{}). Reads(devops.ProjectPipeline{})) webservice.Route(webservice.DELETE("/devops/{devops}/pipelines/{pipeline}"). To(devopsapi.DeleteDevOpsProjectPipelineHandler). - Doc("Delete a pipeline under the DevOps Project"). + Doc("Delete the specified pipeline of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("pipeline", "The name of pipeline, e.g. sample-pipeline"))) + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("pipeline", "the name of pipeline, e.g. sample-pipeline"))) webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/config"). To(devopsapi.GetDevOpsProjectPipelineHandler). - Doc("Get the configuration information of a pipeline under the DevOps Project"). + Doc("Get the configuration information of the specified pipeline of the DevOps Project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("pipeline", "The name of pipeline, e.g. sample-pipeline")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("pipeline", "the name of pipeline, e.g. sample-pipeline")). Returns(http.StatusOK, RespOK, devops.ProjectPipeline{}). Writes(devops.ProjectPipeline{})) - webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/sonarStatus"). + webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/sonarstatus"). To(devopsapi.GetPipelineSonarStatusHandler). - Doc("Get the sonar quality information for a pipeline under the DevOps Project"). + Doc("Get the sonar quality information for the specified pipeline of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, e.g. sample-pipeline")). Returns(http.StatusOK, RespOK, []devops.SonarStatus{}). Writes([]devops.SonarStatus{})) - webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipelines}/branches/{branch}/sonarStatus"). + webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipelines}/branches/{branch}/sonarstatus"). To(devopsapi.GetMultiBranchesPipelineSonarStatusHandler). - Doc("Get the sonar quality check information for a pipeline branch under the DevOps Project"). + Doc("Get the sonar quality check information for the specified pipeline branch of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipelines", "the name of pipeline, e.g. sample-pipeline")). Param(webservice.PathParameter("branch", "branch name, e.g. master")). Returns(http.StatusOK, RespOK, []devops.SonarStatus{}). @@ -178,41 +178,47 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.POST("/devops/{devops}/credentials"). To(devopsapi.CreateDevOpsProjectCredentialHandler). - Doc("Create a Credential under the DevOps Project"). + Doc("Create a Credential in the specified DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Reads(devops.JenkinsCredential{})) webservice.Route(webservice.PUT("/devops/{devops}/credentials/{credential}"). To(devopsapi.UpdateDevOpsProjectCredentialHandler). - Doc("Update a Credential under the DevOps Project"). + Doc("Update the specified credential of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("credential", "Credential's Id, e.g. dockerhub-id")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("credential", "credential's ID, e.g. dockerhub-id")). Reads(devops.JenkinsCredential{})) webservice.Route(webservice.DELETE("/devops/{devops}/credentials/{credential}"). To(devopsapi.DeleteDevOpsProjectCredentialHandler). - Doc("Delete a Credential under the DevOps Project"). + Doc("Delete the specified credential of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("credential", "credential's Id, e.g. dockerhub-id"))) + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("credential", "credential's ID, e.g. dockerhub-id"))) webservice.Route(webservice.GET("/devops/{devops}/credentials/{credential}"). To(devopsapi.GetDevOpsProjectCredentialHandler). - Doc("Get a Credential under the DevOps Project"). + Doc("Get the specified credential of the DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("credential", "Credential's Id, e.g. dockerhub-id")). - Param(webservice.QueryParameter("content", "Get extra content, if not none will get credential's content")). + Param(webservice.QueryParameter("content", ` +Get extra content, if not none will get credential's content. +There are three main types of fields in the credential. +All credential fields, such as name, id, etc., will be returned each time. +Some credential non-encrypted fields, such as the username of the username-password type credential, which returns when the "content" parameter is set to non-empty. +Some encrypted fields, such as the password of the username password type credential, this part of the field will never return. +`)). Returns(http.StatusOK, RespOK, devops.JenkinsCredential{}). Reads(devops.JenkinsCredential{})) webservice.Route(webservice.GET("/devops/{devops}/credentials"). To(devopsapi.GetDevOpsProjectCredentialsHandler). - Doc("Get Credentials under the DevOps Project"). + Doc("Get all credentials of the specified DevOps project"). Metadata(restfulspec.KeyOpenAPITags, tags). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Returns(http.StatusOK, RespOK, []devops.JenkinsCredential{}). Reads([]devops.JenkinsCredential{})) @@ -220,9 +226,9 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}"). To(devopsapi.GetPipeline). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get a Pipeline Inside a DevOps Project"). + Doc("Get the specified pipeline of the DevOps project"). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Returns(http.StatusOK, RespOK, devops.Pipeline{}). Writes(devops.Pipeline{})) @@ -237,10 +243,10 @@ func addWebService(c *restful.Container) error { Param(webservice.QueryParameter("filter", "Filter some types of jobs. e.g. no-folder,will not get a job of type folder"). Required(false). DataFormat("filter=%s")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.QueryParameter("start", "the item number of the search starts from."). Required(false). DataFormat("start=%d")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search."). Required(false). DataFormat("limit=%d")). Returns(http.StatusOK, RespOK, []devops.Pipeline{}). @@ -250,16 +256,16 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/runs"). To(devopsapi.SearchPipelineRuns). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get all runs"). + Doc("Get all runs of the specified pipeline"). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). + Param(webservice.QueryParameter("start", "the item number of the search starts from"). Required(false). DataFormat("start=%d")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search"). Required(false). DataFormat("limit=%d")). - Param(webservice.QueryParameter("branch", "the name of branch, same as repository brnach, will be filter by branch."). + Param(webservice.QueryParameter("branch", "the name of branch, same as repository branch, will be filtered by branch."). Required(false). DataFormat("branch=%s")). Returns(http.StatusOK, RespOK, []devops.BranchPipelineRun{}). @@ -271,10 +277,10 @@ func addWebService(c *restful.Container) error { Metadata(restfulspec.KeyOpenAPITags, tags). Doc("(MultiBranchesPipeline) Get all runs in a branch"). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.QueryParameter("start", "the item number of the search starts from."). Required(false). DataFormat("start=%d")). Returns(http.StatusOK, RespOK, devops.BranchPipelineRun{}). @@ -285,11 +291,11 @@ func addWebService(c *restful.Container) error { To(devopsapi.GetPipelineRunNodesbyBranch). Metadata(restfulspec.KeyOpenAPITags, tags). Doc("(MultiBranchesPipeline) Get run nodes."). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search."). Required(false). DataFormat("limit=%d"). DefaultValue("limit=10000")). @@ -302,13 +308,13 @@ func addWebService(c *restful.Container) error { Metadata(restfulspec.KeyOpenAPITags, tags). Doc("(MultiBranchesPipeline) Get pipelines step log."). Produces("text/plain; charset=utf-8"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). Param(webservice.PathParameter("node", "pipeline node id, the one node in pipeline.")). Param(webservice.PathParameter("step", "pipeline step id, the one step in pipeline.")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.QueryParameter("start", "the item number of the search starts from."). Required(true). DataFormat("start=%d"). DefaultValue("start=0"))) @@ -319,12 +325,12 @@ func addWebService(c *restful.Container) error { Metadata(restfulspec.KeyOpenAPITags, tags). Doc("Get pipelines step log."). Produces("text/plain; charset=utf-8"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). Param(webservice.PathParameter("node", "pipeline node id, the one node in pipeline.")). Param(webservice.PathParameter("step", "pipeline step id, the one step in pipeline.")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.QueryParameter("start", "the item number of the search starts from."). Required(true). DataFormat("start=%d"). DefaultValue("start=0"))) @@ -333,8 +339,8 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.POST("/scms/{scm}/verify"). To(devopsapi.Validate). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Validate Github personal access token."). - Param(webservice.PathParameter("scm", "the id of SCM.")). + Doc("Validate the access token of the specified source configuration management (SCM) such as Github"). + Param(webservice.PathParameter("scm", "the id of the source configuration management (SCM).")). Returns(http.StatusOK, RespOK, devops.Validates{}). Writes(devops.Validates{})) @@ -342,9 +348,9 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/scms/{scm}/organizations"). To(devopsapi.GetSCMOrg). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("List organizations of SCM"). - Param(webservice.PathParameter("scm", "the id of SCM.")). - Param(webservice.QueryParameter("credentialId", "credential id for SCM."). + Doc("List all organizations of the specified source configuration management (SCM) such as Github."). + Param(webservice.PathParameter("scm", "the id of the source configuration management (SCM).")). + Param(webservice.QueryParameter("credentialId", "credential id for source configuration management (SCM)."). Required(true). DataFormat("credentialId=%s")). Returns(http.StatusOK, RespOK, []devops.SCMOrg{}). @@ -354,16 +360,16 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/scms/{scm}/organizations/{organization}/repositories"). To(devopsapi.GetOrgRepo). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get SCM repositories in an organization"). - Param(webservice.PathParameter("scm", "SCM id")). + Doc("List all repositories in the specified organization."). + Param(webservice.PathParameter("scm", "The id of the source configuration management (SCM).")). Param(webservice.PathParameter("organization", "organization Id, such as github username.")). Param(webservice.QueryParameter("credentialId", "credential id for SCM."). Required(true). DataFormat("credentialId=%s")). - Param(webservice.QueryParameter("pageNumber", "the number of page."). + Param(webservice.QueryParameter("pageNumber", "page number."). Required(true). DataFormat("pageNumber=%d")). - Param(webservice.QueryParameter("pageSize", "the size of page."). + Param(webservice.QueryParameter("pageSize", "the item count of one page."). Required(true). DataFormat("pageSize=%d")). Returns(http.StatusOK, RespOK, []devops.OrgRepo{}). @@ -373,8 +379,8 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.POST("/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/stop"). To(devopsapi.StopBranchPipeline). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("(MultiBranchesPipeline) Stop pipeline in running."). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Doc("(MultiBranchesPipeline) Stop pipeline."). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). @@ -393,8 +399,8 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.POST("/devops/{devops}/pipelines/{pipeline}/runs/{run}/stop"). To(devopsapi.StopPipeline). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Stop pipeline in running"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Doc("Stop pipeline"). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). Param(webservice.QueryParameter("blocking", "stop and between each retries will sleep."). @@ -413,7 +419,7 @@ func addWebService(c *restful.Container) error { To(devopsapi.ReplayBranchPipeline). Metadata(restfulspec.KeyOpenAPITags, tags). Doc("(MultiBranchesPipeline) Replay pipeline"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). @@ -425,7 +431,7 @@ func addWebService(c *restful.Container) error { To(devopsapi.ReplayPipeline). Metadata(restfulspec.KeyOpenAPITags, tags). Doc("Replay pipeline"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). Returns(http.StatusOK, RespOK, devops.ReplayPipe{}). @@ -435,13 +441,13 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/log"). To(devopsapi.GetBranchRunLog). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("(MultiBranchesPipeline) Get Pipelines run log."). + Doc("(MultiBranchesPipeline) Get run logs of the specified pipeline activity."). Produces("text/plain; charset=utf-8"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.QueryParameter("start", "the item number of the search starts from."). Required(true). DataFormat("start=%d"). DefaultValue("start=0"))) @@ -450,12 +456,12 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/runs/{run}/log"). To(devopsapi.GetRunLog). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get Pipelines run log."). + Doc("Get run logs of the specified pipeline activity."). Produces("text/plain; charset=utf-8"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.QueryParameter("start", "the item number of the search starts from."). Required(true). DataFormat("start=%d"). DefaultValue("start=0"))) @@ -464,15 +470,15 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/artifacts"). To(devopsapi.GetBranchArtifacts). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("(MultiBranchesPipeline) Get pipeline artifacts."). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Doc("(MultiBranchesPipeline) Get all artifacts in the specified pipeline."). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.QueryParameter("start", "the item number of the search starts from."). Required(false). DataFormat("start=%d")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search."). Required(false). DataFormat("limit=%d")). Returns(http.StatusOK, "The filed of \"Url\" in response can download artifacts", []devops.Artifacts{}). @@ -482,14 +488,14 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/runs/{run}/artifacts"). To(devopsapi.GetArtifacts). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get pipeline artifacts."). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Doc("Get all artifacts in the specified pipeline."). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). - Param(webservice.QueryParameter("start", "the count of item start."). + Param(webservice.QueryParameter("start", "the item number of the search starts from."). Required(false). DataFormat("start=%d")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search."). Required(false). DataFormat("limit=%d")). Returns(http.StatusOK, "The filed of \"Url\" in response can download artifacts", []devops.Artifacts{}). @@ -499,8 +505,8 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/branches"). To(devopsapi.GetPipeBranch). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("(MultiBranchesPipeline) Get pipeline branches."). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Doc("(MultiBranchesPipeline) Get all branches in the specified pipeline."). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.QueryParameter("filter", "filter remote scm. e.g. origin"). Required(true). @@ -518,10 +524,10 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.POST("/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps/{step}"). To(devopsapi.CheckBranchPipeline). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("(MultiBranchesPipeline) Proceed/Break paused pipeline"). + Doc("(MultiBranchesPipeline) Proceed or Break the paused pipeline which waiting for user input."). Reads(devops.CheckPlayload{}). Produces("text/plain; charset=utf-8"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). @@ -532,10 +538,10 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.POST("/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}"). To(devopsapi.CheckPipeline). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Proceed/Break paused pipeline"). + Doc("Proceed or Break the paused pipeline which waiting for user input."). Reads(devops.CheckPlayload{}). Produces("text/plain; charset=utf-8"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). Param(webservice.PathParameter("node", "pipeline node id, the one node in pipeline.")). @@ -545,9 +551,9 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/consolelog"). To(devopsapi.GetConsoleLog). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get index console log."). + Doc("Get scan reponsitory logs in the specified pipeline."). Produces("text/plain; charset=utf-8"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment."))) // match /job/{devops}/job/{pipeline}/build?delay=0 @@ -556,7 +562,7 @@ func addWebService(c *restful.Container) error { Metadata(restfulspec.KeyOpenAPITags, tags). Doc("Scan remote Repositorie, Start a build if have new branch."). Produces("text/html; charset=utf-8"). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.QueryParameter("delay", "will be delay time to scan."). Required(false). @@ -568,7 +574,7 @@ func addWebService(c *restful.Container) error { Metadata(restfulspec.KeyOpenAPITags, tags). Doc("(MultiBranchesPipeline) Run pipeline."). Reads(devops.RunPayload{}). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Returns(http.StatusOK, RespOK, devops.QueuedBlueRun{}). @@ -580,7 +586,7 @@ func addWebService(c *restful.Container) error { Metadata(restfulspec.KeyOpenAPITags, tags). Doc("Run pipeline."). Reads(devops.RunPayload{}). - Param(webservice.PathParameter("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Returns(http.StatusOK, RespOK, devops.QueuedBlueRun{}). Writes(devops.QueuedBlueRun{})) @@ -622,7 +628,7 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/runs/{run}"). To(devopsapi.GetPipelineRun). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get run pipeline in project."). + Doc("Get all activities in the specified pipeline."). Param(webservice.PathParameter("devops", "the name of devops project")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). @@ -633,7 +639,7 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/branches/{branch}"). To(devopsapi.GetBranchPipeline). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("(MultiBranchesPipeline) Get Pipeline run by branch."). + Doc("(MultiBranchesPipeline) Get all activities in the specified pipeline."). Param(webservice.PathParameter("devops", "the name of devops project")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach")). @@ -644,11 +650,11 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes"). To(devopsapi.GetPipelineRunNodes). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get Pipeline run nodes."). + Doc("Get all nodes in the specified activity. node is the stage in the pipeline task"). Param(webservice.PathParameter("devops", "the name of devops project")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build")). - Param(webservice.QueryParameter("limit", "the count of item limit"). + Param(webservice.QueryParameter("limit", "the limit item count of the search"). Required(false). DataFormat("limit=%d")). Returns(http.StatusOK, RespOK, []devops.PipelineRunNodes{}). @@ -658,13 +664,13 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps"). To(devopsapi.GetBranchNodeSteps). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("(MultiBranchesPipeline) Get steps in node by branch."). + Doc("(MultiBranchesPipeline) Get all steps in the specified node."). Param(webservice.PathParameter("devops", "the name of devops project")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). Param(webservice.PathParameter("node", "pipeline node id, the one node in pipeline.")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search."). Required(false). DataFormat("limit=%d")). Returns(http.StatusOK, RespOK, []devops.NodeSteps{}). @@ -674,12 +680,12 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps"). To(devopsapi.GetNodeSteps). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("Get steps in node."). + Doc("Get all steps in the specified node."). Param(webservice.PathParameter("devops", "the name of devops project")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build")). Param(webservice.PathParameter("node", "pipeline node id, the one node in pipeline.")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search."). Required(false). DataFormat("limit=%d")). Returns(http.StatusOK, RespOK, []devops.NodeSteps{}). @@ -737,12 +743,12 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodesdetail"). To(devopsapi.GetBranchNodesDetail). Metadata(restfulspec.KeyOpenAPITags, tags). - Doc("(MultiBranchesPipeline) 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("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Doc("(MultiBranchesPipeline) Gives steps details inside a activity node. For a node, the steps which defined inside the node."). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search."). Required(true). DataFormat("limit=%d")). Returns(http.StatusOK, RespOK, []devops.NodesDetail{}). @@ -752,12 +758,12 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodesdetail"). To(devopsapi.GetNodesDetail). Metadata(restfulspec.KeyOpenAPITags, tags). - 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("devops", "DevOps Project's Id, e.g. project-RRRRAzLBlLEm")). + Doc("Gives steps details inside a activity node. For a node, the steps which defined inside the node."). + Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of pipeline, which helps to deliver continuous integration continuous deployment.")). Param(webservice.PathParameter("branch", "the name of branch, same as repository brnach.")). Param(webservice.PathParameter("run", "pipeline run id, the unique id for a pipeline once build.")). - Param(webservice.QueryParameter("limit", "the count of item limit."). + Param(webservice.QueryParameter("limit", "the limit item count of the search."). Required(true). DataFormat("limit=%d")). Returns(http.StatusOK, RespOK, []devops.NodesDetail{}). diff --git a/pkg/apis/resources/v1alpha2/register.go b/pkg/apis/resources/v1alpha2/register.go index 755a5f7bb16ff1acfe1ccf2d8855c1eafedc8404..a973d87c05d3695bbf58bc0c29aaea9a1cf8b43e 100644 --- a/pkg/apis/resources/v1alpha2/register.go +++ b/pkg/apis/resources/v1alpha2/register.go @@ -130,7 +130,7 @@ func addWebService(c *restful.Container) error { To(resources.ListNamespacedApplication). Returns(http.StatusOK, ok, models.PageableResponse{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). - Doc("List applications"). + Doc("List all applications within the specified namespace"). Param(webservice.QueryParameter(params.ConditionsParam, "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a"). Required(false). DataFormat("key=value,key~value"). @@ -145,13 +145,13 @@ func addWebService(c *restful.Container) error { To(resources.DescribeApplication). Returns(http.StatusOK, ok, applications.Application{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). - Doc("Describe application"). + Doc("Describe the specified application of the namespace"). Param(webservice.PathParameter("namespace", "namespace name")). - Param(webservice.PathParameter("application", "application id"))) + Param(webservice.PathParameter("application", "application ID"))) webservice.Route(webservice.POST("/namespaces/{namespace}/applications"). To(resources.DeployApplication). - Doc("Deploy application"). + Doc("Deploy a new application"). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). Reads(openpitrix.CreateClusterRequest{}). Returns(http.StatusOK, ok, errors.Error{}). @@ -159,11 +159,11 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.DELETE("/namespaces/{namespace}/applications/{application}"). To(resources.DeleteApplication). - Doc("Delete application"). + Doc("Delete the specified application"). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). Returns(http.StatusOK, ok, errors.Error{}). Param(webservice.PathParameter("namespace", "namespace name")). - Param(webservice.PathParameter("application", "application id"))) + Param(webservice.PathParameter("application", "application ID"))) webservice.Route(webservice.GET("/users/{user}/kubectl"). To(resources.GetKubectl). @@ -183,18 +183,18 @@ func addWebService(c *restful.Container) error { webservice.Route(webservice.GET("/components"). To(components.GetComponents). Metadata(restfulspec.KeyOpenAPITags, []string{constants.ComponentStatusTag}). - Doc(""). + Doc("List the system components."). Returns(http.StatusOK, ok, map[string]models.Component{})) webservice.Route(webservice.GET("/components/{component}"). To(components.GetComponentStatus). Metadata(restfulspec.KeyOpenAPITags, []string{constants.ComponentStatusTag}). - Doc(""). + Doc("Describe the specified system component."). Param(webservice.PathParameter("component", "component name")). Returns(http.StatusOK, ok, models.Component{})) webservice.Route(webservice.GET("/componenthealth"). To(components.GetSystemHealthStatus). Metadata(restfulspec.KeyOpenAPITags, []string{constants.ComponentStatusTag}). - Doc(""). + Doc("Get the health status of system components."). Returns(http.StatusOK, ok, map[string]int{})) webservice.Route(webservice.GET("/quotas"). diff --git a/pkg/models/devops/urlconfig.go b/pkg/models/devops/urlconfig.go index 5255040c3d721b292fb4cad46b81179338c946bc..5116671870efa2a0ea92dbe0f78189a1bfbfc6be 100644 --- a/pkg/models/devops/urlconfig.go +++ b/pkg/models/devops/urlconfig.go @@ -40,20 +40,20 @@ const ( ReplayPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/replay/" GetBranchArtifactsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/artifacts/?" GetArtifactsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/artifacts/?" - CheckBranchPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/nodes/%s/steps/%s/" - CheckPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/nodes/%s/steps/%s/" - GetBranchNodeStepsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/nodes/%s/steps/?" - GetNodeStepsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/nodes/%s/steps/?" - ValidateUrl = "/blue/rest/organizations/jenkins/scm/%s/validate" - GetSCMOrgUrl = "/blue/rest/organizations/jenkins/scm/%s/organizations/?" - GetOrgRepoUrl = "/blue/rest/organizations/jenkins/scm/%s/organizations/%s/repositories/?" - GetConsoleLogUrl = "/job/%s/job/%s/indexing/consoleText" - ScanBranchUrl = "/job/%s/job/%s/build?" - GetCrumbUrl = "/crumbIssuer/api/json/" - CheckScriptCompileUrl = "/job/init-job/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile" - CheckCronUrl = "/job/init-job/descriptorByName/hudson.triggers.TimerTrigger/checkSpec?" - ToJenkinsfileUrl = "/pipeline-model-converter/toJenkinsfile" - ToJsonUrl = "/pipeline-model-converter/toJson" - GetNotifyCommitUrl = "/git/notifyCommit/?" - GithubWebhookUrl = "/github-webhook/" + CheckBranchPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/nodes/%s/steps/%s/" + CheckPipelineUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/nodes/%s/steps/%s/" + GetBranchNodeStepsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/branches/%s/runs/%s/nodes/%s/steps/?" + GetNodeStepsUrl = "/blue/rest/organizations/jenkins/pipelines/%s/pipelines/%s/runs/%s/nodes/%s/steps/?" + ValidateUrl = "/blue/rest/organizations/jenkins/scm/%s/validate" + GetSCMOrgUrl = "/blue/rest/organizations/jenkins/scm/%s/organizations/?" + GetOrgRepoUrl = "/blue/rest/organizations/jenkins/scm/%s/organizations/%s/repositories/?" + GetConsoleLogUrl = "/job/%s/job/%s/indexing/consoleText" + ScanBranchUrl = "/job/%s/job/%s/build?" + GetCrumbUrl = "/crumbIssuer/api/json/" + CheckScriptCompileUrl = "/job/init-job/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile" + CheckCronUrl = "/job/init-job/descriptorByName/hudson.triggers.TimerTrigger/checkSpec?" + ToJenkinsfileUrl = "/pipeline-model-converter/toJenkinsfile" + ToJsonUrl = "/pipeline-model-converter/toJson" + GetNotifyCommitUrl = "/git/notifyCommit/?" + GithubWebhookUrl = "/github-webhook/" ) diff --git a/pkg/utils/idutils/id_utils.go b/pkg/utils/idutils/id_utils.go index c7afb0ea5f810c8a19d4e77f3a958440910df2a5..bec44f0ff53503a6ace64203a0c92588b507948f 100644 --- a/pkg/utils/idutils/id_utils.go +++ b/pkg/utils/idutils/id_utils.go @@ -116,4 +116,3 @@ func IPv4() (net.IP, error) { } return nil, errors.New("no ip address") } -