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