mirror of https://github.com/kubevela/kubevela.git
Fix: fix build bug (#2724)
* Fix: fix build bug * Fix: change api spec Co-authored-by: barnettZQG <yiyun.pro>
This commit is contained in:
parent
c42ea7c948
commit
1465aba177
|
|
@ -1945,6 +1945,26 @@
|
|||
],
|
||||
"summary": "list deliveryTarget",
|
||||
"operationId": "listDeliveryTargets",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Query the delivery target belonging to a namespace",
|
||||
"name": "namesapce",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page for paging",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "PageSize for paging",
|
||||
"name": "pageSize",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
|
@ -3758,12 +3778,12 @@
|
|||
},
|
||||
"v1.ApplicationDeployResponse": {
|
||||
"required": [
|
||||
"reason",
|
||||
"deployUser",
|
||||
"note",
|
||||
"triggerType",
|
||||
"version",
|
||||
"status"
|
||||
"status",
|
||||
"reason"
|
||||
],
|
||||
"properties": {
|
||||
"deployUser": {
|
||||
|
|
@ -4466,12 +4486,12 @@
|
|||
"alias": {
|
||||
"type": "string"
|
||||
},
|
||||
"cluster": {
|
||||
"$ref": "#/definitions/v1.ClusterTarget"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"kubernetes": {
|
||||
"$ref": "#/definitions/v1.ClusterTarget"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -4578,6 +4598,9 @@
|
|||
"alias": {
|
||||
"type": "string"
|
||||
},
|
||||
"cluster": {
|
||||
"$ref": "#/definitions/v1.ClusterTarget"
|
||||
},
|
||||
"createTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
|
|
@ -4585,9 +4608,6 @@
|
|||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"kubernetes": {
|
||||
"$ref": "#/definitions/v1.ClusterTarget"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -4659,13 +4679,13 @@
|
|||
},
|
||||
"v1.DetailApplicationResponse": {
|
||||
"required": [
|
||||
"name",
|
||||
"alias",
|
||||
"description",
|
||||
"icon",
|
||||
"namespace",
|
||||
"description",
|
||||
"createTime",
|
||||
"updateTime",
|
||||
"name",
|
||||
"alias",
|
||||
"namespace",
|
||||
"policies",
|
||||
"status",
|
||||
"resourceInfo",
|
||||
|
|
@ -4729,20 +4749,20 @@
|
|||
},
|
||||
"v1.DetailClusterResponse": {
|
||||
"required": [
|
||||
"labels",
|
||||
"apiServerURL",
|
||||
"reason",
|
||||
"dashboardURL",
|
||||
"description",
|
||||
"status",
|
||||
"alias",
|
||||
"provider",
|
||||
"kubeConfigSecret",
|
||||
"createTime",
|
||||
"name",
|
||||
"kubeConfig",
|
||||
"updateTime",
|
||||
"description",
|
||||
"icon",
|
||||
"provider",
|
||||
"dashboardURL",
|
||||
"labels",
|
||||
"status",
|
||||
"apiServerURL",
|
||||
"kubeConfig",
|
||||
"createTime",
|
||||
"updateTime",
|
||||
"alias",
|
||||
"reason",
|
||||
"name",
|
||||
"resourceInfo"
|
||||
],
|
||||
"properties": {
|
||||
|
|
@ -4802,11 +4822,11 @@
|
|||
"required": [
|
||||
"createTime",
|
||||
"name",
|
||||
"appPrimaryKey",
|
||||
"updateTime",
|
||||
"creator",
|
||||
"alias",
|
||||
"type"
|
||||
"type",
|
||||
"creator",
|
||||
"updateTime",
|
||||
"appPrimaryKey"
|
||||
],
|
||||
"properties": {
|
||||
"alias": {
|
||||
|
|
@ -4910,6 +4930,9 @@
|
|||
"alias": {
|
||||
"type": "string"
|
||||
},
|
||||
"cluster": {
|
||||
"$ref": "#/definitions/v1.ClusterTarget"
|
||||
},
|
||||
"createTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
|
|
@ -4917,9 +4940,6 @@
|
|||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"kubernetes": {
|
||||
"$ref": "#/definitions/v1.ClusterTarget"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -4937,13 +4957,13 @@
|
|||
},
|
||||
"v1.DetailPolicyResponse": {
|
||||
"required": [
|
||||
"updateTime",
|
||||
"name",
|
||||
"type",
|
||||
"description",
|
||||
"creator",
|
||||
"properties",
|
||||
"createTime"
|
||||
"createTime",
|
||||
"updateTime"
|
||||
],
|
||||
"properties": {
|
||||
"createTime": {
|
||||
|
|
@ -5022,13 +5042,13 @@
|
|||
},
|
||||
"v1.DetailWorkflowResponse": {
|
||||
"required": [
|
||||
"default",
|
||||
"createTime",
|
||||
"updateTime",
|
||||
"name",
|
||||
"alias",
|
||||
"description",
|
||||
"enable",
|
||||
"default",
|
||||
"createTime",
|
||||
"workflowRecord"
|
||||
],
|
||||
"properties": {
|
||||
|
|
@ -5329,10 +5349,10 @@
|
|||
},
|
||||
"v1.NamespaceDetailResponse": {
|
||||
"required": [
|
||||
"createTime",
|
||||
"updateTime",
|
||||
"name",
|
||||
"description"
|
||||
"description",
|
||||
"createTime",
|
||||
"updateTime"
|
||||
],
|
||||
"properties": {
|
||||
"createTime": {
|
||||
|
|
@ -5510,12 +5530,12 @@
|
|||
"alias": {
|
||||
"type": "string"
|
||||
},
|
||||
"cluster": {
|
||||
"$ref": "#/definitions/v1.ClusterTarget"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"kubernetes": {
|
||||
"$ref": "#/definitions/v1.ClusterTarget"
|
||||
},
|
||||
"variable": {
|
||||
"type": "object"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,8 +188,8 @@ var RevisionStatusComplete = "complete"
|
|||
// RevisionStatusFail event status failure
|
||||
var RevisionStatusFail = "failure"
|
||||
|
||||
// DeployEventTerminated event status terminated
|
||||
var DeployEventTerminated = "terminated"
|
||||
// RevisionStatusTerminated event status terminated
|
||||
var RevisionStatusTerminated = "terminated"
|
||||
|
||||
// ApplicationRevision be created when an application initiates deployment and describes the phased version of the application.
|
||||
type ApplicationRevision struct {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ type DeliveryTarget struct {
|
|||
Namespace string `json:"namespace"`
|
||||
Alias string `json:"alias,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Cluster *ClusterTarget `json:"kubernetes,omitempty"`
|
||||
Cluster *ClusterTarget `json:"cluster,omitempty"`
|
||||
Variable map[string]interface{} `json:"variable,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ type CreateDeliveryTargetRequest struct {
|
|||
Namespace string `json:"namespace" validate:"checkname"`
|
||||
Alias string `json:"alias,omitempty" validate:"checkalias" optional:"true"`
|
||||
Description string `json:"description,omitempty" optional:"true"`
|
||||
Cluster *ClusterTarget `json:"kubernetes,omitempty"`
|
||||
Cluster *ClusterTarget `json:"cluster,omitempty"`
|
||||
Variable map[string]interface{} `json:"variable,omitempty"`
|
||||
}
|
||||
|
||||
|
|
@ -639,7 +639,7 @@ type CreateDeliveryTargetRequest struct {
|
|||
type UpdateDeliveryTargetRequest struct {
|
||||
Alias string `json:"alias,omitempty" validate:"checkalias" optional:"true"`
|
||||
Description string `json:"description,omitempty" optional:"true"`
|
||||
Cluster *ClusterTarget `json:"kubernetes,omitempty"`
|
||||
Cluster *ClusterTarget `json:"cluster,omitempty"`
|
||||
Variable map[string]interface{} `json:"variable,omitempty"`
|
||||
}
|
||||
|
||||
|
|
@ -666,7 +666,7 @@ type DeliveryTargetBase struct {
|
|||
Namespace string `json:"namespace" validate:"checkname"`
|
||||
Alias string `json:"alias,omitempty" validate:"checkalias" optional:"true"`
|
||||
Description string `json:"description,omitempty" optional:"true"`
|
||||
Cluster *ClusterTarget `json:"kubernetes,omitempty"`
|
||||
Cluster *ClusterTarget `json:"cluster,omitempty"`
|
||||
Variable map[string]interface{} `json:"variable,omitempty"`
|
||||
CreateTime time.Time `json:"createTime"`
|
||||
UpdateTime time.Time `json:"updateTime"`
|
||||
|
|
|
|||
|
|
@ -341,9 +341,9 @@ func (w *workflowUsecaseImpl) updateRecordApplicationRevisionStatus(ctx context.
|
|||
return err
|
||||
}
|
||||
if terminated {
|
||||
applicationRevision.Status = model.DeployEventTerminated
|
||||
applicationRevision.Status = model.RevisionStatusTerminated
|
||||
} else {
|
||||
applicationRevision.Status = model.DeployEventComplete
|
||||
applicationRevision.Status = model.RevisionStatusComplete
|
||||
}
|
||||
|
||||
if err := w.ds.Put(ctx, applicationRevision); err != nil {
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ var _ = Describe("Test workflow usecase functions", func() {
|
|||
var deployEvent = &model.ApplicationRevision{
|
||||
AppPrimaryKey: "test",
|
||||
Version: "1234",
|
||||
Status: model.DeployEventInit,
|
||||
Status: model.RevisionStatusInit,
|
||||
DeployUser: "test-user",
|
||||
WorkflowName: "test-workflow-name",
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ var _ = Describe("Test workflow usecase functions", func() {
|
|||
By("check the deploy event")
|
||||
err = workflowUsecase.ds.Get(ctx, deployEvent)
|
||||
Expect(err).Should(BeNil())
|
||||
Expect(deployEvent.Status).Should(Equal(model.DeployEventComplete))
|
||||
Expect(deployEvent.Status).Should(Equal(model.RevisionStatusComplete))
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ func (dt *DeliveryTargetWebService) GetWebService() *restful.WebService {
|
|||
ws.Route(ws.GET("/").To(dt.listDeliveryTargets).
|
||||
Doc("list deliveryTarget").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Param(ws.PathParameter("namesapce", "Query the delivery target belonging to a namespace").DataType("string")).
|
||||
Param(ws.QueryParameter("namesapce", "Query the delivery target belonging to a namespace").DataType("string")).
|
||||
Param(ws.QueryParameter("page", "Page for paging").DataType("integer")).
|
||||
Param(ws.QueryParameter("pageSize", "PageSize for paging").DataType("integer")).
|
||||
Returns(200, "", apis.ListDeliveryTargetResponse{}).
|
||||
Writes(apis.ListDeliveryTargetResponse{}).Do(returns200, returns500))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue