Run executes 'helm push' against the given chart archive.
(chartRef string, remote string)
| 91 | |
| 92 | // Run executes 'helm push' against the given chart archive. |
| 93 | func (p *Push) Run(chartRef string, remote string) (string, error) { |
| 94 | var out strings.Builder |
| 95 | |
| 96 | c := uploader.ChartUploader{ |
| 97 | Out: &out, |
| 98 | Pushers: pusher.All(p.Settings), |
| 99 | Options: []pusher.Option{ |
| 100 | pusher.WithTLSClientConfig(p.certFile, p.keyFile, p.caFile), |
| 101 | pusher.WithInsecureSkipTLSVerify(p.insecureSkipTLSVerify), |
| 102 | pusher.WithPlainHTTP(p.plainHTTP), |
| 103 | }, |
| 104 | } |
| 105 | |
| 106 | if registry.IsOCI(remote) { |
| 107 | // Don't use the default registry client if tls options are set. |
| 108 | c.Options = append(c.Options, pusher.WithRegistryClient(p.cfg.RegistryClient)) |
| 109 | } |
| 110 | |
| 111 | return out.String(), c.UploadTo(chartRef, remote) |
| 112 | } |
nothing calls this directly
no test coverage detected