Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Root = &cobra.Command{ Use: "brigade-vacuum", Short: "Clean up old Brigade builds", Long: mainUsage, RunE: func(cmd *cobra.Command, args []string) error { a := getAge() mb := maxBuilds() srb := getSkipRunningBuilds() if a == "" && mb == 0 { return errors.New("one of --age or --max-builds must be greater than zero") } var age = vacuum.NoMaxAge if a != "" { dur, err := time.ParseDuration(a) if err != nil { return err } age = time.Now().Add(-dur) } c, err := kube.GetClient("", kubeConfigPath()) if err != nil { return err } if globalVerbose { fmt.Fprintf(os.Stderr, "Max Age: %s\nMax Builds: %d\n", age, mb) } return vacuum.New(age, mb, srb, c, ns()).Run() }, }
Root is the top-level command, which just prints help text.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.