diff --git a/cmd/werf/bundle/export/export.go b/cmd/werf/bundle/export/export.go index 45ac0fbb2f..176a66ac3f 100644 --- a/cmd/werf/bundle/export/export.go +++ b/cmd/werf/bundle/export/export.go @@ -17,6 +17,7 @@ import ( "github.com/werf/werf/cmd/werf/common" "github.com/werf/werf/pkg/build" "github.com/werf/werf/pkg/config" + "github.com/werf/werf/pkg/container_runtime" "github.com/werf/werf/pkg/deploy/helm/chart_extender" "github.com/werf/werf/pkg/deploy/helm/chart_extender/helpers" "github.com/werf/werf/pkg/git_repo" @@ -162,6 +163,9 @@ func runExport(ctx context.Context) error { } defer func() { + if _, match := containerRuntime.(*container_runtime.DockerServerRuntime); !match { + return + } if err := common.RunAutoHostCleanup(ctx, &commonCmdData); err != nil { logboek.Context(ctx).Error().LogF("Auto host cleanup failed: %s\n", err) } diff --git a/cmd/werf/bundle/publish/publish.go b/cmd/werf/bundle/publish/publish.go index 5119d279a2..3071697d5c 100644 --- a/cmd/werf/bundle/publish/publish.go +++ b/cmd/werf/bundle/publish/publish.go @@ -20,6 +20,7 @@ import ( "github.com/werf/werf/cmd/werf/common" "github.com/werf/werf/pkg/build" "github.com/werf/werf/pkg/config" + "github.com/werf/werf/pkg/container_runtime" "github.com/werf/werf/pkg/deploy/bundles" "github.com/werf/werf/pkg/deploy/helm/chart_extender" "github.com/werf/werf/pkg/deploy/helm/chart_extender/helpers" @@ -178,6 +179,9 @@ func runPublish(ctx context.Context) error { } defer func() { + if _, match := containerRuntime.(*container_runtime.DockerServerRuntime); !match { + return + } if err := common.RunAutoHostCleanup(ctx, &commonCmdData); err != nil { logboek.Context(ctx).Error().LogF("Auto host cleanup failed: %s\n", err) } diff --git a/cmd/werf/cleanup/cleanup.go b/cmd/werf/cleanup/cleanup.go index 07eb0389ff..4fe553d8e3 100644 --- a/cmd/werf/cleanup/cleanup.go +++ b/cmd/werf/cleanup/cleanup.go @@ -9,6 +9,7 @@ import ( "github.com/werf/logboek" "github.com/werf/werf/cmd/werf/common" "github.com/werf/werf/pkg/cleaning" + "github.com/werf/werf/pkg/container_runtime" "github.com/werf/werf/pkg/git_repo" "github.com/werf/werf/pkg/git_repo/gitdata" "github.com/werf/werf/pkg/image" @@ -133,6 +134,9 @@ func runCleanup(ctx context.Context) error { } defer func() { + if _, match := containerRuntime.(*container_runtime.DockerServerRuntime); !match { + return + } if err := common.RunAutoHostCleanup(ctx, &commonCmdData); err != nil { logboek.Context(ctx).Error().LogF("Auto host cleanup failed: %s\n", err) } diff --git a/cmd/werf/compose/main.go b/cmd/werf/compose/main.go index f670166d13..c07d7eadbb 100644 --- a/cmd/werf/compose/main.go +++ b/cmd/werf/compose/main.go @@ -323,6 +323,9 @@ func runMain(ctx context.Context, dockerComposeCmdName string, cmdData composeCm } defer func() { + if _, match := containerRuntime.(*container_runtime.DockerServerRuntime); !match { + return + } if err := common.RunAutoHostCleanup(ctx, &commonCmdData); err != nil { logboek.Context(ctx).Error().LogF("Auto host cleanup failed: %s\n", err) } diff --git a/cmd/werf/converge/converge.go b/cmd/werf/converge/converge.go index 218df16d27..f9b992c137 100644 --- a/cmd/werf/converge/converge.go +++ b/cmd/werf/converge/converge.go @@ -203,6 +203,9 @@ func runMain(ctx context.Context) error { } defer func() { + if _, match := containerRuntime.(*container_runtime.DockerServerRuntime); !match { + return + } if err := common.RunAutoHostCleanup(ctx, &commonCmdData); err != nil { logboek.Context(ctx).Error().LogF("Auto host cleanup failed: %s\n", err) } diff --git a/cmd/werf/dismiss/dismiss.go b/cmd/werf/dismiss/dismiss.go index 51f2336e9b..572db83d63 100644 --- a/cmd/werf/dismiss/dismiss.go +++ b/cmd/werf/dismiss/dismiss.go @@ -6,7 +6,7 @@ import ( "time" "github.com/spf13/cobra" - helm_v3 "helm.sh/helm/v3/cmd/helm" + "helm.sh/helm/v3/cmd/helm" "helm.sh/helm/v3/pkg/action" "github.com/werf/kubedog/pkg/kube"