gerrit

package
v0.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package gerrit provides gerrit utilities

Index

Constants

This section is empty.

Variables

View Source
var GerritCmd = &cobra.Command{
	Use:   "gerrit",
	Short: "Deploy a demo Gerrit instance to hack on sf-operator",
	Run: func(cmd *cobra.Command, args []string) {
		deploy, _ := cmd.Flags().GetBool("deploy")
		wipe, _ := cmd.Flags().GetBool("wipe")
		fqdn, _ := cmd.Flags().GetString("fqdn")

		if !(deploy || wipe) {
			println("Select one of deploy or wipe option")
			os.Exit(1)
		}

		cl := utils.CreateKubernetesClientOrDie("")
		ctx := context.Background()
		env := cliutils.ENV{
			Cli: cl,
			Ns:  ns,
			Ctx: ctx,
		}
		if deploy {
			fmt.Println("Ensure Gerrit deployed in namespace", ns)
			cligerrit.EnsureGerrit(&env, fqdn)
			fmt.Printf("Gerrit is available at https://gerrit.%s\n", fqdn)
		}

		if wipe {
			fmt.Println("Wipe Gerrit from namespace", ns)

			cligerrit.WipeGerrit(&env, false)
		}

	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL