Skip to content

Commit 8159b00

Browse files
committed
fix(deploy): bundle copy panics
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
1 parent 16a1048 commit 8159b00

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cmd/werf/bundle/copy/copy.go

+15
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import (
88
"github.com/spf13/cobra"
99

1010
helm_v3 "github.com/werf/3p-helm/cmd/helm"
11+
"github.com/werf/3p-helm/pkg/chart"
12+
"github.com/werf/3p-helm/pkg/chartutil"
13+
"github.com/werf/3p-helm/pkg/werf/secrets"
14+
"github.com/werf/common-go/pkg/secrets_manager"
1115
"github.com/werf/logboek"
1216
"github.com/werf/werf/v2/cmd/werf/common"
1317
"github.com/werf/werf/v2/pkg/deploy/bundles"
@@ -129,6 +133,17 @@ func runCopy(ctx context.Context) error {
129133
return fmt.Errorf("incompatible options specified, could not use --helm-compatible-chart and --rename-chart=%q at the same time", *commonCmdData.RenameChart)
130134
}
131135

136+
secrets.CoalesceTablesFunc = chartutil.CoalesceTables
137+
secrets_manager.DisableSecretsDecryption = true
138+
139+
secretWorkDir, err := os.Getwd()
140+
if err != nil {
141+
return fmt.Errorf("get current working directory: %w", err)
142+
}
143+
secrets.SecretsWorkingDir = secretWorkDir
144+
145+
chart.CurrentChartType = chart.ChartTypeBundle
146+
132147
return logboek.Context(ctx).LogProcess("Copy bundle").DoError(func() error {
133148
logboek.Context(ctx).LogFDetails("From: %s\n", fromAddr.String())
134149
logboek.Context(ctx).LogFDetails("To: %s\n", toAddr.String())

0 commit comments

Comments
 (0)