Skip to content

Commit

Permalink
fix(pkg/skaffold/runner): use pointer semantics for pipelineBuilderWi…
Browse files Browse the repository at this point in the history
…thHooks to make it hash-able
  • Loading branch information
ar3s3ru committed Sep 5, 2023
1 parent e4a8f3d commit 77b944e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/skaffold/runner/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type pipelineBuilderWithHooks struct {

// PreBuild executes any one-time setup required prior to starting any build on this builder,
// followed by any Build pre-hooks set for the pipeline.
func (b pipelineBuilderWithHooks) PreBuild(ctx context.Context, out io.Writer) error {
func (b *pipelineBuilderWithHooks) PreBuild(ctx context.Context, out io.Writer) error {
if err := b.PipelineBuilder.PreBuild(ctx, out); err != nil {
return err
}
Expand All @@ -98,7 +98,7 @@ func (b pipelineBuilderWithHooks) PreBuild(ctx context.Context, out io.Writer) e

// PostBuild executes any one-time teardown required after all builds on this builder are complete,
// followed by any Build post-hooks set for the pipeline.
func (b pipelineBuilderWithHooks) PostBuild(ctx context.Context, out io.Writer) error {
func (b *pipelineBuilderWithHooks) PostBuild(ctx context.Context, out io.Writer) error {
if err := b.PipelineBuilder.PostBuild(ctx, out); err != nil {
return err
}
Expand All @@ -111,7 +111,7 @@ func (b pipelineBuilderWithHooks) PostBuild(ctx context.Context, out io.Writer)
}

func withPipelineBuildHooks(pb build.PipelineBuilder, buildHooks latest.BuildHooks) build.PipelineBuilder {
return pipelineBuilderWithHooks{
return &pipelineBuilderWithHooks{
PipelineBuilder: pb,
hooksRunner: hooks.BuildRunner(buildHooks, hooks.BuildEnvOpts{}),
}
Expand Down

0 comments on commit 77b944e

Please sign in to comment.