diff --git a/src/cmd/servicePushDeployShared.go b/src/cmd/servicePushDeployShared.go index f4fa4190..7ad14209 100644 --- a/src/cmd/servicePushDeployShared.go +++ b/src/cmd/servicePushDeployShared.go @@ -8,6 +8,7 @@ import ( "path/filepath" "github.com/pkg/errors" + "github.com/zeropsio/zcli/src/entity" "github.com/zeropsio/zcli/src/httpClient" "github.com/zeropsio/zcli/src/i18n" @@ -136,9 +137,10 @@ func validateZeropsYamlContent( yamlContent []byte, ) error { resp, err := restApiClient.PostServiceStackZeropsYamlValidation(ctx, body.ZeropsYamlValidation{ - ServiceStackName: service.Name, - ServiceStackTypeId: service.ServiceTypeId, - ZeropsYaml: types.NewMediumText(string(yamlContent)), + ServiceStackTypeVersionName: service.ServiceStackTypeVersionName, + ServiceStackName: service.Name, + ServiceStackTypeId: service.ServiceTypeId, + ZeropsYaml: types.NewMediumText(string(yamlContent)), }) if err != nil { return err diff --git a/src/entity/repository/service.go b/src/entity/repository/service.go index fb61ecd7..445b9235 100644 --- a/src/entity/repository/service.go +++ b/src/entity/repository/service.go @@ -111,11 +111,12 @@ func serviceFromEsSearch(esServiceStack zeropsRestApiClient.EsServiceStack) enti func serviceFromApiOutput(service output.ServiceStack) entity.Service { return entity.Service{ - ID: service.Id, - ClientId: service.Project.ClientId, - Name: service.Name, - Status: service.Status, - ServiceTypeId: service.ServiceStackTypeId, - ServiceTypeCategory: service.ServiceStackTypeInfo.ServiceStackTypeCategory, + ID: service.Id, + ClientId: service.Project.ClientId, + Name: service.Name, + Status: service.Status, + ServiceTypeId: service.ServiceStackTypeId, + ServiceTypeCategory: service.ServiceStackTypeInfo.ServiceStackTypeCategory, + ServiceStackTypeVersionName: service.ServiceStackTypeInfo.ServiceStackTypeVersionName, } } diff --git a/src/entity/service.go b/src/entity/service.go index 1fcf53d2..fe7ffd76 100644 --- a/src/entity/service.go +++ b/src/entity/service.go @@ -8,10 +8,11 @@ import ( ) type Service struct { - ID uuid.ServiceStackId - ClientId uuid.ClientId - Name types.String - Status enum.ServiceStackStatusEnum - ServiceTypeId stringId.ServiceStackTypeId - ServiceTypeCategory enum.ServiceStackTypeCategoryEnum + ID uuid.ServiceStackId + ClientId uuid.ClientId + Name types.String + Status enum.ServiceStackStatusEnum + ServiceTypeId stringId.ServiceStackTypeId + ServiceTypeCategory enum.ServiceStackTypeCategoryEnum + ServiceStackTypeVersionName types.String }