Skip to content

Commit da83ca4

Browse files
committed
fix: resolve review comments
1 parent b1a3bdf commit da83ca4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

cmd/skaffold/app/cmd/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func doExec(ctx context.Context, out io.Writer, args []string) error {
5252
return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error {
5353
buildArtifacts, err := getBuildArtifactsAndSetTagsForAction(configs, r.ApplyDefaultRepo, args[0])
5454
if err != nil {
55-
tips.PrintUseRunVsDeploy(out)
55+
tips.PrintUseBuildAndExec(out)
5656
return err
5757
}
5858
return r.Exec(ctx, out, buildArtifacts, args[0])

cmd/skaffold/app/tips/tips.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ func PrintUseRunVsDeploy(out io.Writer) {
5050
printTip(out, "or [skaffold run] instead, to let Skaffold build, tag and deploy artifacts.")
5151
}
5252

53+
// PrintUseBuildAndExec prints tip to use artifacts from previous build in skaffold exec.
54+
func PrintUseBuildAndExec(out io.Writer) {
55+
printTip(out, "Check all the images have a tag assigned:")
56+
printTip(out, "run [skaffold exec] with [--build-artifacts <file-output>] for running an action using images from a previous build")
57+
}
58+
5359
func printTip(out io.Writer, message string) {
5460
output.Green.Fprintln(out, message)
5561
}

pkg/skaffold/actions/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (r Runner) Exec(ctx context.Context, out io.Writer, allbuilds []graph.Artif
7979

8080
err = a.Exec(ctx, out)
8181
log.Entry(ctx).Debugf("Finished execution for %v", a.name)
82-
r.cleanup(context.TODO(), out, []Task{a}, []ExecEnv{execEnv})
82+
r.cleanup(ctx, out, []Task{a}, []ExecEnv{execEnv})
8383
return err
8484
}
8585

0 commit comments

Comments
 (0)