diff --git a/src/chartserver/handler_manipulation.go b/src/chartserver/handler_manipulation.go index 1119e6eed..5f56c8a54 100644 --- a/src/chartserver/handler_manipulation.go +++ b/src/chartserver/handler_manipulation.go @@ -99,7 +99,11 @@ func (c *Controller) DeleteChartVersion(namespace, chartName, version string) er Repository: &model.Repository{ Name: fmt.Sprintf("%s/%s", namespace, chartName), }, - Vtags: []string{version}, + Artifacts: []*model.Artifact{ + { + Tags: []string{version}, + }, + }, }, }, } diff --git a/src/chartserver/reverse_proxy.go b/src/chartserver/reverse_proxy.go index 2625ad712..5839d3ff2 100644 --- a/src/chartserver/reverse_proxy.go +++ b/src/chartserver/reverse_proxy.go @@ -118,14 +118,14 @@ func modifyResponse(res *http.Response) error { }() // Trigger harbor webhook - if e != nil && e.Resource != nil && e.Resource.Metadata != nil && len(e.Resource.Metadata.Vtags) > 0 && + if e != nil && e.Resource != nil && e.Resource.Metadata != nil && len(e.Resource.Metadata.Artifacts) > 0 && len(e.Resource.ExtendedInfo) > 0 { event := &n_event.Event{} metaData := &metadata.ChartUploadMetaData{ ChartMetaData: metadata.ChartMetaData{ ProjectName: e.Resource.ExtendedInfo["projectName"].(string), ChartName: e.Resource.ExtendedInfo["chartName"].(string), - Versions: e.Resource.Metadata.Vtags, + Versions: e.Resource.Metadata.Artifacts[0].Tags, OccurAt: time.Now(), Operator: e.Resource.ExtendedInfo["operator"].(string), }, diff --git a/src/core/api/chart_repository.go b/src/core/api/chart_repository.go index b2abf2f78..2b39d5f5a 100755 --- a/src/core/api/chart_repository.go +++ b/src/core/api/chart_repository.go @@ -507,7 +507,11 @@ func (cra *ChartRepositoryAPI) addEventContext(files []formFile, request *http.R "public": strconv.FormatBool(public), }, }, - Vtags: []string{chartDetails.Metadata.Version}, + Artifacts: []*model.Artifact{ + { + Tags: []string{chartDetails.Metadata.Version}, + }, + }, }, ExtendedInfo: extInfo, },