diff --git a/cmd/werf/build/main.go b/cmd/werf/build/main.go index 0f6b759238..e1c46927b4 100644 --- a/cmd/werf/build/main.go +++ b/cmd/werf/build/main.go @@ -2,7 +2,6 @@ package build import ( "github.com/spf13/cobra" - "github.com/werf/werf/cmd/werf/common" stages_build "github.com/werf/werf/cmd/werf/stages/build/cmd_factory" ) diff --git a/cmd/werf/build_and_publish/main.go b/cmd/werf/build_and_publish/main.go index 738a9519d7..c63939e60f 100644 --- a/cmd/werf/build_and_publish/main.go +++ b/cmd/werf/build_and_publish/main.go @@ -120,6 +120,7 @@ func runBuildAndPublish(imagesToProcess []string) error { ctx := common.BackgroundContext() werf.PostponeMultiwerfNotUpToDateWarning() + werf.PostponeWerf11DeprecationWarning() if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { return fmt.Errorf("initialization error: %s", err) diff --git a/cmd/werf/converge/converge.go b/cmd/werf/converge/converge.go index 83082e6887..2a1348478b 100644 --- a/cmd/werf/converge/converge.go +++ b/cmd/werf/converge/converge.go @@ -126,6 +126,7 @@ func runConverge() error { ctx := common.BackgroundContext() werf.PostponeMultiwerfNotUpToDateWarning() + werf.PostponeWerf11DeprecationWarning() if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { return fmt.Errorf("initialization error: %s", err) diff --git a/cmd/werf/deploy/main.go b/cmd/werf/deploy/main.go index bea10740f4..bb546d3f49 100644 --- a/cmd/werf/deploy/main.go +++ b/cmd/werf/deploy/main.go @@ -129,6 +129,7 @@ func runDeploy() error { ctx := common.BackgroundContext() werf.PostponeMultiwerfNotUpToDateWarning() + werf.PostponeWerf11DeprecationWarning() if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { return fmt.Errorf("initialization error: %s", err) diff --git a/cmd/werf/deploy_v2/main.go b/cmd/werf/deploy_v2/main.go index aefcdda421..69b88cad80 100644 --- a/cmd/werf/deploy_v2/main.go +++ b/cmd/werf/deploy_v2/main.go @@ -143,6 +143,7 @@ func runDeploy() error { ctx := common.BackgroundContext() werf.PostponeMultiwerfNotUpToDateWarning() + werf.PostponeWerf11DeprecationWarning() if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { return fmt.Errorf("initialization error: %s", err) diff --git a/cmd/werf/images/publish/cmd_factory/main.go b/cmd/werf/images/publish/cmd_factory/main.go index 06f4001757..81694eb91b 100644 --- a/cmd/werf/images/publish/cmd_factory/main.go +++ b/cmd/werf/images/publish/cmd_factory/main.go @@ -90,6 +90,7 @@ func runImagesPublish(commonCmdData *common.CmdData, imagesToProcess []string) e ctx := common.BackgroundContext() werf.PostponeMultiwerfNotUpToDateWarning() + werf.PostponeWerf11DeprecationWarning() if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { return fmt.Errorf("initialization error: %s", err) diff --git a/cmd/werf/run/run.go b/cmd/werf/run/run.go index 26935b50d7..8e20e8e61c 100644 --- a/cmd/werf/run/run.go +++ b/cmd/werf/run/run.go @@ -169,6 +169,7 @@ func runRun() error { ctx := common.BackgroundContext() werf.PostponeMultiwerfNotUpToDateWarning() + werf.PostponeWerf11DeprecationWarning() if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { return fmt.Errorf("initialization error: %s", err) diff --git a/cmd/werf/stages/build/cmd_factory/main.go b/cmd/werf/stages/build/cmd_factory/main.go index 3160578888..e44f2b574f 100644 --- a/cmd/werf/stages/build/cmd_factory/main.go +++ b/cmd/werf/stages/build/cmd_factory/main.go @@ -108,6 +108,7 @@ func runStagesBuild(cmdData *CmdData, commonCmdData *common.CmdData, imagesToPro ctx := common.BackgroundContext() werf.PostponeMultiwerfNotUpToDateWarning() + werf.PostponeWerf11DeprecationWarning() if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { return fmt.Errorf("initialization error: %s", err) diff --git a/pkg/werf/global_warnings.go b/pkg/werf/global_warnings.go index b99c241f76..89b5873001 100644 --- a/pkg/werf/global_warnings.go +++ b/pkg/werf/global_warnings.go @@ -78,6 +78,14 @@ func PostponeMultiwerfNotUpToDateWarning() { ) } +func PostponeWerf11DeprecationWarning() { + GlobalWarningLines = append( + GlobalWarningLines, + "werf v1.1 is DEPRECATED. Consider switching to the more recent version of werf: https://werf.io/installation.html", + "No support and no updates will be provided for werf v1.1 after July 1, 2022.", + ) +} + func printGlobalWarningLn(ctx context.Context, line string) { logboek.Context(ctx).Error().LogF("WARNING: %s\n", line) }