Skip to content
Permalink
Browse files
fix: Add missing WERF_TIMEOUT variable for --timeout param
  • Loading branch information
distorhead committed Dec 17, 2021
1 parent 5b52fe8 commit 672d37952a51551d6d72305704476da1f89f5276
Showing with 6 additions and 2 deletions.
  1. +6 −2 cmd/werf/converge/converge.go
@@ -9,7 +9,7 @@ import (
"time"

"github.com/spf13/cobra"
"helm.sh/helm/v3/cmd/helm"
helm_v3 "helm.sh/helm/v3/cmd/helm"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/chart/loader"
@@ -154,7 +154,11 @@ werf converge --repo registry.mydomain.com/web --env production`,
common.SetupAllowedLocalCacheVolumeUsageMargin(&commonCmdData, cmd)
common.SetupDockerServerStoragePath(&commonCmdData, cmd)

cmd.Flags().IntVarP(&cmdData.Timeout, "timeout", "t", 0, "Resources tracking timeout in seconds")
defaultTimeout, err := common.GetIntEnvVar("WERF_TIMEOUT")
if err != nil || defaultTimeout == nil {
defaultTimeout = new(int64)
}
cmd.Flags().IntVarP(&cmdData.Timeout, "timeout", "t", int(*defaultTimeout), "Resources tracking timeout in seconds")
cmd.Flags().BoolVarP(&cmdData.AutoRollback, "auto-rollback", "R", common.GetBoolEnvironmentDefaultFalse("WERF_AUTO_ROLLBACK"), "Enable auto rollback of the failed release to the previous deployed release version when current deploy process have failed ($WERF_AUTO_ROLLBACK by default)")
cmd.Flags().BoolVarP(&cmdData.AutoRollback, "atomic", "", common.GetBoolEnvironmentDefaultFalse("WERF_ATOMIC"), "Enable auto rollback of the failed release to the previous deployed release version when current deploy process have failed ($WERF_ATOMIC by default)")

0 comments on commit 672d379

Please sign in to comment.