Skip to content

Commit

Permalink
Preserve options when doing a cache push (#423)
Browse files Browse the repository at this point in the history
* Preserve options when doing a cache push

Otherwise options like `insecure` are lost

* Do not override original object
  • Loading branch information
carlossg authored and dlorenc committed Nov 6, 2018
1 parent fc43e21 commit 5ed45ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/executor/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func pushLayerToCache(opts *config.KanikoOptions, cacheKey string, layer v1.Laye
if err != nil {
return errors.Wrap(err, "appending layer onto empty image")
}
return DoPush(empty, &config.KanikoOptions{
Destinations: []string{cache},
})
cacheOpts := *opts
cacheOpts.Destinations = []string{cache}
return DoPush(empty, &cacheOpts)
}

0 comments on commit 5ed45ed

Please sign in to comment.