task

package
v0.0.0-...-c83230f Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TaskCmd = &cobra.Command{
	Use:   "task",
	Short: "Manage task definition and control running task on Amazon ECS",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {

		pd, err := cmdutil.GetProjectDir()
		if err != nil {
			return err
		}
		projectDir = pd

		region := viper.GetString("aws_region")
		client.Init(region, false)

		td, err := cmd.Flags().GetString("task-definition")
		if err != nil {
			return err
		}
		taskDefinition = td

		all, err := cmd.Flags().GetBool("all")
		if err != nil {
			return err
		}

		if taskDefinition == "" && all == false {
			return errors.New("should specify '-t task_definition_name' or '--all' option")
		}

		paramTokens, err := cmd.Flags().GetStringSlice("parameter")
		if err != nil {
			return err
		}
		parameters = util.ParseKeyValues(paramTokens)

		return nil
	},
}

taskCmd represents the task command

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