Skip to content

Commit

Permalink
Merge branch 'dev' into poetry-install
Browse files Browse the repository at this point in the history
  • Loading branch information
BartSchuurmans authored Sep 13, 2024
2 parents 514324f + 33f3a1e commit f2f603e
Show file tree
Hide file tree
Showing 62 changed files with 2,510 additions and 829 deletions.
9 changes: 4 additions & 5 deletions artifactory/commands/buildinfo/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package buildinfo
import (
"errors"
"fmt"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/commandssummaries"
"github.com/jfrog/jfrog-cli-core/v2/commandsummary"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/utils/commandsummary"
"net/url"
"strconv"
"strings"
Expand Down Expand Up @@ -146,7 +145,7 @@ func (bpc *BuildPublishCommand) Run() error {
return err
}

if err = recordCommandSummary(buildInfo, buildLink, bpc.serverDetails.Url, majorVersion); err != nil {
if err = recordCommandSummary(buildInfo, buildLink); err != nil {
return err
}

Expand Down Expand Up @@ -232,12 +231,12 @@ func (bpc *BuildPublishCommand) getNextBuildNumber(buildName string, servicesMan
return strconv.Itoa(latestBuildNumber), nil
}

func recordCommandSummary(buildInfo *buildinfo.BuildInfo, buildLink, serverUrl string, majorVersion int) (err error) {
func recordCommandSummary(buildInfo *buildinfo.BuildInfo, buildLink string) (err error) {
if !commandsummary.ShouldRecordSummary() {
return
}
buildInfo.BuildUrl = buildLink
buildInfoSummary, err := commandsummary.New(commandssummaries.NewBuildInfo(serverUrl, majorVersion), "build-info")
buildInfoSummary, err := commandsummary.NewBuildInfoSummary()
if err != nil {
return
}
Expand Down
120 changes: 0 additions & 120 deletions artifactory/commands/commandssummaries/buildinfosummary.go

This file was deleted.

129 changes: 0 additions & 129 deletions artifactory/commands/commandssummaries/buildinfosummary_test.go

This file was deleted.

23 changes: 0 additions & 23 deletions artifactory/commands/commandssummaries/testdata/modules.md

This file was deleted.

11 changes: 0 additions & 11 deletions artifactory/commands/commandssummaries/testdata/table.md

This file was deleted.

19 changes: 0 additions & 19 deletions artifactory/commands/commandssummaries/utils.go

This file was deleted.

16 changes: 4 additions & 12 deletions artifactory/commands/generic/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package generic

import (
"errors"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/commandssummaries"
"github.com/jfrog/jfrog-cli-core/v2/commandsummary"
"github.com/jfrog/jfrog-client-go/artifactory"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/utils/commandsummary"
"os"

buildInfo "github.com/jfrog/build-info-go/entities"
Expand Down Expand Up @@ -159,7 +157,7 @@ func (uc *UploadCommand) upload() (err error) {
successCount = summary.TotalSucceeded
failCount = summary.TotalFailed

if err = recordCommandSummary(servicesManager, summary, serverDetails.Url); err != nil {
if err = recordCommandSummary(summary); err != nil {
return
}
}
Expand Down Expand Up @@ -282,17 +280,11 @@ func createDeleteSpecForSync(deletePattern string, syncDeletesProp string) *spec
BuildSpec()
}

func recordCommandSummary(servicesManager artifactory.ArtifactoryServicesManager, summary *rtServicesUtils.OperationSummary, platformUrl string) (err error) {
func recordCommandSummary(summary *rtServicesUtils.OperationSummary) (err error) {
if !commandsummary.ShouldRecordSummary() {
return
}

majorVersion, err := utils.GetRtMajorVersion(servicesManager)
if err != nil {
return err
}

uploadSummary, err := commandsummary.New(commandssummaries.NewUploadSummary(platformUrl, majorVersion), "upload")
uploadSummary, err := commandsummary.NewUploadSummary()
if err != nil {
return
}
Expand Down
Loading

0 comments on commit f2f603e

Please sign in to comment.