Grouped commands help description

This commit is contained in:
Alex Dadgar
2018-03-21 14:04:54 -07:00
parent 148a9504e7
commit 6f0dbbb72b
15 changed files with 372 additions and 30 deletions

View File

@@ -1,13 +1,43 @@
package command
import "github.com/mitchellh/cli"
import (
"strings"
"github.com/mitchellh/cli"
)
type DeploymentCommand struct {
Meta
}
func (f *DeploymentCommand) Help() string {
return "This command is accessed by using one of the subcommands below."
helpText := `
Usage: nomad deployment <subcommand> [options] [args]
This command groups subcommands for interacting with deployments. Deployments
are used to manage a transistion 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 <depoloyment-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 <depoloyment-id>
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
}
func (f *DeploymentCommand) Synopsis() string {