github.com/superfly/nomad@v0.10.5-fly/command/deployment.go (about) 1 package command 2 3 import ( 4 "strings" 5 6 "github.com/mitchellh/cli" 7 ) 8 9 type DeploymentCommand struct { 10 Meta 11 } 12 13 func (f *DeploymentCommand) Help() string { 14 helpText := ` 15 Usage: nomad deployment <subcommand> [options] [args] 16 17 This command groups subcommands for interacting with deployments. Deployments 18 are used to manage a transition between two versions of a Nomad job. Users 19 can inspect an ongoing deployment, promote canary allocations, force fail 20 deployments, and more. 21 22 Examine a deployments status: 23 24 $ nomad deployment status <deployment-id> 25 26 Promote the canaries to allow the remaining allocations to be updated in a 27 rolling deployment fashion: 28 29 $ nomad deployment promote <deployment-id> 30 31 Mark a deployment as failed. This will stop new allocations from being placed 32 and if the job's upgrade stanza specifies auto_revert, causes the job to 33 revert back to the last stable version of the job: 34 35 $ nomad deployment fail <deployment-id> 36 37 Please see the individual subcommand help for detailed usage information. 38 ` 39 40 return strings.TrimSpace(helpText) 41 } 42 43 func (f *DeploymentCommand) Synopsis() string { 44 return "Interact with deployments" 45 } 46 47 func (f *DeploymentCommand) Name() string { return "deployment" } 48 49 func (f *DeploymentCommand) Run(args []string) int { 50 return cli.RunResultHelp 51 }