run

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2018 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RunCmd = &cobra.Command{
	Use:   "run [flags] <COMMAND>",
	Short: aboutText,
	Long:  fmt.Sprintf("\n%s", aboutText),

	Args: cobra.ExactArgs(1),
	RunE: func(cmd *cobra.Command, args []string) error {
		logger.Info.Println("Running command: ", args[0])

		o, err := config.TrainOctopus()
		if err != nil {
			return err
		}

		numErrs, err := o.Do(tentacle.CommandRunner(args[0]))
		if err != nil {
			return fmt.Errorf("octopus run command failure: %+v", err)
		}
		os.Exit(numErrs)
		return nil
	},
}

RunCmd is the 'run' command definition which runs a command on remote hosts.

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