Example #1
0
func checkArgs(cliConnection plugin.CliConnection, args []string) error {
	if len(args) < 2 {
		if args[0] == "open" {
			cliConnection.CliCommand(args[0], "-h")
			return errors.New("Appname is needed")
		} else if args[0] == "service-open" {
			cliConnection.CliCommand(args[0], "-h")
			return errors.New("Appname is needed")
		}
	}
	return nil
}
func (cmd *Wildcard) WildcardCommand(cliConnection plugin.CliConnection, args []string) {
	force := false
	if args[0] == "-f" {
		force = true
		args = append(args[:0], args[1:]...)
	}
	command := args[0]
	pattern := args[1]
	apps := getMatchedApps(cliConnection, pattern)
	if !force && len(apps) > 0 {
		cmd.WildcardCommandApps(cliConnection, pattern)
		fmt.Println("")
		fmt.Printf("Would you like to %s (%s)nteractively, (%s)ll, or (%s)ancel ?%s", command, table.PromptColor("i"), table.PromptColor("a"), table.PromptColor("c"), table.PromptColor(">"))
		var mode string
		fmt.Scanf("%s", &mode)
		if strings.EqualFold(mode, "a") || strings.EqualFold(mode, "all") {
			force = true
		} else if strings.EqualFold(mode, "i") || strings.EqualFold(mode, "interactively") {
			force = false
		} else {
			fmt.Println(table.WarningColor("Cancelled"))
			return
		}
	} else {
		introduction(cliConnection, pattern)
	}
	for _, app := range apps {
		coloredCommand := table.EntityNameColor(command)
		coloredAppName := table.EntityNameColor(app.Name)
		if !force {
			var confirmation string
			fmt.Printf("Really %s app %s?%s ", table.PromptColor(command), table.PromptColor(app.Name), table.PromptColor(">"))
			fmt.Scanf("%s", &confirmation)
			if !strings.EqualFold(confirmation, "y") && !strings.EqualFold(confirmation, "yes") {
				continue
			}
		}
		fmt.Println("Running command", coloredCommand, "on app", coloredAppName)
		args[1] = app.Name
		fmt.Println(args)
		_, err := cliConnection.CliCommand(args...)
		if err != nil {
			fmt.Println("PLUGIN ERROR: Error from CliCommand: ", err)
		}
	}
	if len(apps) == 0 {
		fmt.Println(table.WarningColor("No apps found matching"), table.WarningColor(pattern))
	} else {
		fmt.Println(table.SuccessColor("OK"))
	}
}
Example #3
0
func createServices(cliConnection plugin.CliConnection) {
	services, err := cliConnection.GetServices()
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	redisFound, redisBound, sqlFound, sqlBound := false, false, false, false
	for _, service := range services {
		if service.Name == "hackday-rediscloud" {
			redisFound = true
			for _, app := range service.ApplicationNames {
				if app == "hackday-nc" {
					redisBound = true
				}
			}
		}
		if service.Name == "hackday-cleardb" {
			sqlFound = true
			for _, app := range service.ApplicationNames {
				if app == "hackday-nc" {
					sqlBound = true
				}
			}
		}
	}
	if !redisFound {
		_, err = cliConnection.CliCommand("cs", "rediscloud", "30mb", "hackday-rediscloud")
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	}
	if !redisBound {
		_, err = cliConnection.CliCommand("bs", "hackday-nc", "hackday-rediscloud")
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	}
	if !sqlFound {
		_, err = cliConnection.CliCommand("cs", "cleardb", "turtle", "hackday-cleardb")
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	}
	if !sqlBound {
		_, err = cliConnection.CliCommand("bs", "hackday-nc", "hackday-cleardb")
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	}
}
Example #4
0
func (c *PushMetadataPlugin) Run(cliConnection plugin.CliConnection, args []string) {
	if args[0] != pluginCommand {
		return
	}
	output, _ := sh.Command("git", "rev-parse", "HEAD").Output()
	fmt.Println("SHA" + string(output))

	err := ioutil.WriteFile(".cfmetadata", output, 0644)
	if err != nil {
		fmt.Println("error " + err.Error())
	}

	args[0] = "push"
	_, err = cliConnection.CliCommand(args...)
	if err != nil {
		fmt.Println("cli error " + err.Error())
	}
	// Pass the args to cf push
}
Example #5
0
func (c *CliCmd) Run(cliConnection plugin.CliConnection, args []string) {
	// Invoke the cf command passed as the set of arguments
	// after the first argument.
	//
	// Calls to plugin.CliCommand([]string) must be done after the invocation
	// of plugin.Start() to ensure the environment is bootstrapped.
	output, err := cliConnection.CliCommand(args[1:]...)

	// The call to plugin.CliCommand() returns an error if the cli command
	// returns a non-zero return code. The output written by the CLI
	// is returned in any case.
	if err != nil {
		fmt.Println("PLUGIN ERROR: Error from CliCommand: ", err)
	}

	// Print the output returned from the CLI command.
	fmt.Println("")
	fmt.Println("---------- Command output from the plugin ----------")
	for index, val := range output {
		fmt.Println("#", index, " value: ", val)
	}
	fmt.Println("----------              FIN               -----------")
}
Example #6
0
func uninstall(cliConnection plugin.CliConnection) {
	fmt.Println("This plugin is being uninstalled, here are a list of apps you have running.")
	cliConnection.CliCommand("apps")
}
Example #7
0
/*
*	This function must be implemented by any plugin because it is part of the
*	plugin interface defined by the core CLI.
*
*	Run(....) is the entry point when the core CLI is invoking a command defined
*	by a plugin. The first parameter, plugin.CliConnection, is a struct that can
*	be used to invoke cli commands. The second paramter, args, is a slice of
*	strings. args[0] will be the name of the command, and will be followed by
*	any additional arguments a cli user typed in.
*
*	Any error handling should be handled with the plugin itself (this means printing
*	user facing errors). The CLI will exit 0 if the plugin exits 0 and will exit
*	1 should the plugin exits nonzero.
 */
func (c *TreelineCli) Run(cliConnection plugin.CliConnection, args []string) {
	// Ensure that we called the command treeline
	if args[0] == "treeline" {
		_, err := exec.LookPath("treeline")
		if err != nil {
			fmt.Println("Please install treeline using 'npm install -g treeline'")
			os.Exit(1)
		}

		if args[1] == "config-pws" {
			writeDevelopmentConfig()
			if _, err := os.Stat(".cfignore"); os.IsNotExist(err) {
				err := os.Symlink(".gitignore", ".cfignore")
				if err != nil {
					fmt.Println("Could not link .cfignore to .gitignore", err)
					os.Exit(1)
				}
			}
			npmInstalls()
			os.Exit(0)
		}

		if args[1] == "deploy" {
			_, err = cliConnection.CliCommand("push", "hackday-nc", "--no-start")
			if err != nil {
				fmt.Println(err)
				os.Exit(1)
			}
			_, err = cliConnection.CliCommand("set-env", "hackday-nc", "NODE_ENV", "development")
			if err != nil {
				fmt.Println(err)
				os.Exit(1)
			}

			createServices(cliConnection)

			_, err = cliConnection.CliCommand("start", "hackday-nc")
			if err != nil {
				fmt.Println(err)
				os.Exit(1)
			}

			os.Exit(0)
		}

		cmd := exec.Command("treeline", args[1:]...)
		cmd.Stdin = os.Stdin
		cmd.Stdout = os.Stdout

		err = cmd.Start()
		if err != nil {
			fmt.Println("Error starting command", err)
			os.Exit(1)
		}
		err = cmd.Wait()
		if err != nil {
			fmt.Println("Error running command", err)
			os.Exit(1)
		}
	}
}
Example #8
0
func (c *CoreCmd) Run(cliConnection plugin.CliConnection, args []string) {
	if args[0] == "core-command" {
		output, err := cliConnection.CliCommand(args[1:]...)
		if err != nil {
			fmt.Println("PLUGIN ERROR: Error from CliCommand: ", err)
		}
		dumpOutput(output)
	} else if args[0] == "core-command-quiet" {
		output, err := cliConnection.CliCommandWithoutTerminalOutput(args[1:]...)
		if err != nil {
			fmt.Println("PLUGIN ERROR: Error from CliCommand: ", err)
		}
		dumpOutput(output)
	} else if args[0] == "awesomeness" {
		cliConnection.CliCommand("plugins")
	} else if len(args) == 2 && args[0] == "awesomeness" && args[1] == "easter_egg" {
		fmt.Println(`
ZZZZ$Z$$$ZZ$$$$$77$777777777777777777777I77II7I?III?IIII???????+++????????++++++=++++++++++++++++++=++======+======+++++
ZZZZZZZZ$$ZZ$77777777777III777777I7777IIIIIIIII??IIIIII???????++++???????++++++++++++?????++++++++++========+===~+=+++++
ZZZZZZ$$$$$$77777$$77I77777777III77IIIIII7IIIII????II????I7$ZZZ$$7I???????++?+++++++++++++++++++++++==+=============++++
$ZZ77$7$$$$$777777777777I7777IIII77I777III?III??????IDNNMNNNNNDDDNNNDDO7????+++++=++=++++++++=++++====+========~~===++++
ZZ$$$7777$$$$$777777777777IIIIIIII7IIIIIIIIII?I??+IZNND8NNNMMMMNNNDDDNND8?+??+?++++++++++++++==+=+===++=======~~~====+++
$$$$$$$$Z$$$$7777777777I7I?II??IIIIII?III???????$DMNN8O8NNNNNNNNMMMMND8DNMD$+++?++==++++++++=======~===========~~======+
$$$$Z$$$$$$$7777I777IIIIII?IIIIIIIII?????+????ZNND8DDZZDDDDDDDNNNNNNMMMMNNNNNZ?++=====+++++++=====~~==~===~==~=~=~======
$$$7$$$7$777III777IIIIIIIIIII??III??III???++?$MNNDDD8$O88DDDNMNNNNNNMMMMMMDNMMN7+=====+++++==========~~~~~~~~~~=~======+
77777777777777IIIII7IIIII????????II?????++++$DN8Z7?+++=++???I$ODNNNMMMMMNNNNNMMM+=+===~==========~==~~~~~~~~~~~~=~======
$$77777777777I77IIIIIIII????II?III?????++++I8N$I?+======++???I$O8DDNNNMMNNNMNMNMZ+=+==~===~~====~==~~~~~~~~~~~~~~~======
$$77777777III77IIIIIIII??????I?I????+++++?I8NOI?=~~~~~~~~~==+?I7$ZDNNNNMMMMNNNMNMO+===~~===~~~~~~~~~~~~~~~~~~::~~=======
$$$$$$77II77IIIIIIIIIII?????????????+++++7NM87+=~:~~:~~~~~~==++I7$8DNNNMNMMMMMNMNMO=~=======~~~~~~~:~~~~~~:::::::~~=====
77777$$7IIII?II??II??????????++++??++===$NMNZI+=~~~~~~~~~~~==+?I7$OO8DNMNNNMNNMMNMM$==+++===~===~~~~~~~~:::::::::~~~====
7II?I7I77III???+????++???????++????+==~+$DMD$I+=======~=====+???I7$ZO8DDNNMMNNMMMMMD???+++++++==~=~~~~=~~~~~:::::~~~==+=
777I777$7II???????++++??????+++???++==+IONM8$I+============+++??II7$ZZODNNNMMMMMMMMM7?I??????+=====~~~~~~~~~~::::~~~===+
$7777$$ZZ7I7I??++?I?++?++???+++++++===7$DNNO7I++===~~=======++++++?I7$Z8NNNNNMNMNMMM8I7IIII7I+=====~+=~~::::~~~::~~~===+
ZZZOOZ8OO$7III?II77I?+++++++++=====+=?78DMMZI?=+===~=~=~==++=+++???II7Z8NMMMMMMMNMNMD7$$$I77I????+++?=~~~~~~~::::::~==++
O8888ZZZ88Z$$$$7777$7?I7?++=+=++====+7$8NMMOI?????+=+===?7$7IIIII77$ZZODNNMMMMMMNNMNN$OZ$7IIII?I??++?+?+=~~:~~:::::===++
O8DD8OOOOOOOZ$$$$$Z$$$Z$7I++++++====?$Z8MMM87?I77$I++++?$ZOZZZZOZ$OOOOO8NNMMMMMMNNNMMOZ$ZZ$$777I??+??+?+=~~:~~~::::~====
DDDD88OOOZZZZOOOZZOOOOZ$ZZ7+?+=++=++IOO8DNMDDDI777$ZI+?ZDDZ7$OOO8DMNO$ZODMMMNNNNMMMNMDOZZZZZ$III?I7$7I??=~~~~~~~:~==++++
888888888OOOO8OZO8OOOZO$7$Z+?+=+++??IZDNNMMOZDIZNDO7I=I8O$I?IOZZZZ???I7O8MMNNMMMMMMMMNOOZZZZZ7$$$77$77I++~:::::~:~====+?
DD8D8O8OOO888OOOZ8D8O88ZZ8+???IZO$???ONNMMMZIIII$Z7?+=7ZZ7??I77$7I++?I7ODMMMMMMMMNNNMMO8OOOZ$7$$$77$777I?=~~~~~~~===+++?
8D88OO88OOO8888OODD888OOO8OZ7$OO$8Z7ZO8NMMN7?+=====+?+I77I?=~~~~~=??I7Z8DMMMMNMMMMMNNMZZZZZ$$777$$$Z$$$7I+==~==~=====++?
8DDDO88888888DDD8DD88DD8O888OZOZ$DO$OO8NMMM$?+====++++?II?+==~~~==?I7$Z8NMMMMNMMMMNNNMZZZZZZ$$Z$$$$ZZZ$7I?==========++??
DD888D8OO8DDD8ODNDD88DDD8D8D8O8OODOO88DNNMM8I+=~==+++=?II?++====++I7$ZODNMMMNMMNMMNNNM77777I??I???????????++++++???????I
NMMNNNNNDDDND8D88DD8DDDDDD8DD8D8D8DNNNNNNMMD7+++==++++II7I?++==++?7$ZO8NNMMMNNNMMMMMNN88OOOOO$$$$$$$7I??I???++??III7$$7I
NMMNDDNNNDDDD88O88888D8DN8DDDDDDNNNMMNNNMMMMZ7++??I?=?777ZI++=+??I$ZOODNNMMMMMMMMMMMMNDD8O8OOOZZZZZZZ$ZZ$7I7777I7I7$$ZZZ
NNNNNDDNNDDDNDNDD888DD88DDDDDDDDDNNNNNMMMMMMD$II?++?$8NMND7++??II7ZO88DNMMMMMMMMMMMMMMNDDD888OOOOOO8OZ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???=++=++++++++==+==+++I7ZDDDDOZ8D8NNNNNNNNMND8888O7+?I?7$$77$$$$ZOOOO
NMMNNNNMNNNDDDNDDDD8888NMMNDNMMMMMMMMMMMMMMMMMZIII++++++==+=+++++==+++????7Z888DOZ8DDNNNNNNNNMNND88D8$?IIII777$$Z$$$Z$$$
NNNNNNMNNDDDNDDD8O8O8DDNMNNNNMMMMNNNMMMMMMMNNN7I?+++========++========++??I$8OO88O8DNMNNNNMDDNNMNDDDOO$I$7I??II??I777777
NNNMNNNND8DDD8DDO8D8DNDNDDNNDDNMNNNMMMMMMMNNNOI+++++=~~=====+====~=====+?I$$8DO88O8NNMNNNDD88DDDNNNN8OO8Z$77Z7?7O777$O$$
NDNNNDNNND8888O8OO8O8DDDNNDDDNNDNNMMMMMMNDDDO$?+==============~====+++++?I$8O888888MMMNN8ZZZ88DDNMMNND8Z$$IIIIII?IIII???
NNNMNDMMNM8Z8$ZOOO8OODDDDD888DNNMMMMMMMM8OZZO7++======~~~=======~~==++?+?I$ZOO8D88DND888OZOZ7ZZZO8DNMMMND88888Z77777I?I?
NNNNNDMMNMDDN$ZOZZOOZO88DN888DMMMMMMMMMMOZZ$$?=+===========~=====~===+++?I$ZOO8DDD8OOZ$$$7$$$8DDDDNMNNMMMD8O88OZ$$$OO77$
NNNNNNMMNNNDNMN8OZZO88O8D88DNMMMMMMMMMMNZ7II?+==========~======~=~===++??7ZOO888O$7$$$$I?IIII$O8DNMMMMMMMMNDD8ODD88888DO
DDNNDDNDDNNNNNNDNDOOOOOOO88MMMMMMMMMMMN8$III+===~=========~~=~~~==~==++?I$$ZZZZOOOZ7I?7$O888DNNNNNNMMMMMMMMNNDD88DNNDO$I
NNNNDDDNNNDNNNNNN88DDD8OZ$MMMMMMMMMMMMND7?++=======+===~~~~~~~~=~~~~~=+??7$$ZOO$7$ZO8DDNNNMMMMMMMMMMMMMMMMMMMD88DDD8888D
DNNNNNNNDDDDDNDDDDD888OZ$8MMMMMMMMMMMNDD87?++=~~=++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