redeploy

package
v0.0.0-...-966d904 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = models.Command{
	Name:      "redeploy",
	ShortHelp: "Redeploy a service without having to do a git push. This will cause downtime for all redeploys (see the resources page for more details).",
	LongHelp: "<code>redeploy</code> deploys an identical copy of the given service. " +
		"For code services, this avoids having to perform a code push. You skip the git push and the build. " +
		"For service proxies, new instances replace the old ones. " +
		"All other service types cannot be redeployed with this command. " +
		"For service proxy redeploys, there will be approximately 5 minutes of downtime. " +
		"For code service redeploys, there will be approximately 30 seconds of downtime. " +
		"Here is a sample command\n\n" +
		"<pre>\ndatica -E \"<your_env_name>\" redeploy app01\n</pre>",
	CmdFunc: func(settings *models.Settings) func(cmd *cli.Cmd) {
		return func(cmd *cli.Cmd) {
			serviceName := cmd.StringArg("SERVICE_NAME", "", "The name of the service to redeploy (e.g. 'app01')")
			cmd.Action = func() {
				if _, err := auth.New(settings, prompts.New()).Signin(); err != nil {
					logrus.Fatal(err.Error())
				}
				if err := config.CheckRequiredAssociation(settings); err != nil {
					logrus.Fatal(err.Error())
				}
				err := CmdRedeploy(settings.EnvironmentID, *serviceName, jobs.New(settings), services.New(settings), environments.New(settings))
				if err != nil {
					logrus.Fatal(err.Error())
				}
			}
			cmd.Spec = "SERVICE_NAME"
		}
	},
}

Cmd is the contract between the user and the CLI. This specifies the command name, arguments, and required/optional arguments and flags for the command.

Functions

func CmdRedeploy

func CmdRedeploy(envID, svcName string, ij jobs.IJobs, is services.IServices, ie environments.IEnvironments) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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