Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create detailed summary for every command when JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR is set #2820

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions artifactory/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ func containerPushCmd(c *cli.Context, containerManagerType containerutils.Contai
if err != nil {
return
}
printDeploymentView, detailedSummary := log.IsStdErrTerminal(), c.Bool("detailed-summary")
printDeploymentView, detailedSummary := log.IsStdErrTerminal(), cliutils.GetDetailedSummary(c)
dockerPushCommand.SetThreads(threads).SetDetailedSummary(detailedSummary || printDeploymentView).SetCmdParams([]string{"push", imageTag}).SetSkipLogin(skipLogin).SetBuildConfiguration(buildConfiguration).SetRepo(targetRepo).SetServerDetails(artDetails).SetImageTag(imageTag)
err = cliutils.ShowDockerDeprecationMessageIfNeeded(containerManagerType, dockerPushCommand.IsGetRepoSupported)
if err != nil {
Expand Down Expand Up @@ -1318,7 +1318,7 @@ func downloadCmd(c *cli.Context) error {
return err
}
downloadCommand := generic.NewDownloadCommand()
downloadCommand.SetConfiguration(configuration).SetBuildConfiguration(buildConfiguration).SetSpec(downloadSpec).SetServerDetails(serverDetails).SetDryRun(c.Bool("dry-run")).SetSyncDeletesPath(c.String("sync-deletes")).SetQuiet(cliutils.GetQuietValue(c)).SetDetailedSummary(c.Bool("detailed-summary")).SetRetries(retries).SetRetryWaitMilliSecs(retryWaitTime)
downloadCommand.SetConfiguration(configuration).SetBuildConfiguration(buildConfiguration).SetSpec(downloadSpec).SetServerDetails(serverDetails).SetDryRun(c.Bool("dry-run")).SetSyncDeletesPath(c.String("sync-deletes")).SetQuiet(cliutils.GetQuietValue(c)).SetDetailedSummary(cliutils.GetDetailedSummary(c)).SetRetries(retries).SetRetryWaitMilliSecs(retryWaitTime)

if downloadCommand.ShouldPrompt() && !coreutils.AskYesNo("Sync-deletes may delete some files in your local file system. Are you sure you want to continue?\n"+
"You can avoid this confirmation message by adding --quiet to the command.", false) {
Expand Down
2 changes: 1 addition & 1 deletion buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ func GoPublishCmd(c *cli.Context) (err error) {
return err
}
version := c.Args().Get(0)
printDeploymentView, detailedSummary := log.IsStdErrTerminal(), c.Bool("detailed-summary")
printDeploymentView, detailedSummary := log.IsStdErrTerminal(), cliutils.GetDetailedSummary(c)
goPublishCmd := golang.NewGoPublishCommand()
goPublishCmd.SetConfigFilePath(configFilePath).SetBuildConfiguration(buildConfiguration).SetVersion(version).SetDetailedSummary(detailedSummary || printDeploymentView).SetExcludedPatterns(cliutils.GetStringsArrFlagValue(c, "exclusions"))
err = commands.Exec(goPublishCmd)
Expand Down
6 changes: 3 additions & 3 deletions distribution/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func releaseBundleCreateCmd(c *cli.Context) error {
if err != nil {
return err
}
releaseBundleCreateCmd.SetServerDetails(dsDetails).SetReleaseBundleCreateParams(params).SetSpec(releaseBundleCreateSpec).SetDryRun(c.Bool("dry-run")).SetDetailedSummary(c.Bool("detailed-summary"))
releaseBundleCreateCmd.SetServerDetails(dsDetails).SetReleaseBundleCreateParams(params).SetSpec(releaseBundleCreateSpec).SetDryRun(c.Bool("dry-run")).SetDetailedSummary(cliutils.GetDetailedSummary(c))

err = commands.Exec(releaseBundleCreateCmd)
if releaseBundleCreateCmd.IsDetailedSummary() {
Expand Down Expand Up @@ -158,7 +158,7 @@ func releaseBundleUpdateCmd(c *cli.Context) error {
if err != nil {
return err
}
releaseBundleUpdateCmd.SetServerDetails(dsDetails).SetReleaseBundleUpdateParams(params).SetSpec(releaseBundleUpdateSpec).SetDryRun(c.Bool("dry-run")).SetDetailedSummary(c.Bool("detailed-summary"))
releaseBundleUpdateCmd.SetServerDetails(dsDetails).SetReleaseBundleUpdateParams(params).SetSpec(releaseBundleUpdateSpec).SetDryRun(c.Bool("dry-run")).SetDetailedSummary(cliutils.GetDetailedSummary(c))

err = commands.Exec(releaseBundleUpdateCmd)
if releaseBundleUpdateCmd.IsDetailedSummary() {
Expand All @@ -182,7 +182,7 @@ func releaseBundleSignCmd(c *cli.Context) error {
if err != nil {
return err
}
releaseBundleSignCmd.SetServerDetails(dsDetails).SetReleaseBundleSignParams(params).SetDetailedSummary(c.Bool("detailed-summary"))
releaseBundleSignCmd.SetServerDetails(dsDetails).SetReleaseBundleSignParams(params).SetDetailedSummary(cliutils.GetDetailedSummary(c))
err = commands.Exec(releaseBundleSignCmd)
if releaseBundleSignCmd.IsDetailedSummary() {
if summary := releaseBundleSignCmd.GetSummary(); summary != nil {
Expand Down
Loading