Skip to content

Commit

Permalink
remove dependency only pod, use new dep-output flag to get dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
shawn-hurley committed Mar 13, 2024
1 parent 51c297a commit af6489f
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ func (a *analyzeCommand) RunAnalysis(ctx context.Context, xmlOutputDir string) e
if labelSelector != "" {
args = append(args, fmt.Sprintf("--label-selector=%s", labelSelector))
}
if a.mode == string(provider.FullAnalysisMode) {
args = append(args, fmt.Sprintf("--dep-output-file=%s", DepsOutputMountPath))
}

analysisLogFilePath := filepath.Join(a.output, "analysis.log")
depsLogFilePath := filepath.Join(a.output, "dependency.log")
Expand Down Expand Up @@ -756,30 +759,6 @@ func (a *analyzeCommand) RunAnalysis(ctx context.Context, xmlOutputDir string) e
return err
}

// run dependency analysis only when full mode is set
if a.mode == string(provider.FullAnalysisMode) {
a.log.Info("running dependency analysis",
"log", depsLogFilePath, "input", a.input, "output", a.output, "args", strings.Join(args, " "))
a.log.Info("generating dependency log in file", "file", depsLogFilePath)
err = NewContainer(a.log).Run(
ctx,
WithStdout(dependencyLog),
WithStderr(dependencyLog),
WithVolumes(volumes),
WithEntrypointBin("/usr/bin/konveyor-analyzer-dep"),
WithEntrypointArgs(
fmt.Sprintf("--output-file=%s", DepsOutputMountPath),
fmt.Sprintf("--provider-settings=%s", ProviderSettingsMountPath),
),
WithCleanup(a.cleanup),
)
if err != nil {
return err
}
} else {
a.log.Info("skipping dependency analysis", "mode", a.mode)
}

return nil
}

Expand Down

0 comments on commit af6489f

Please sign in to comment.