open-nomad/command/job.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
949 B
Go
Raw Permalink Normal View History

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
2016-12-05 05:22:13 +00:00
package command
2018-03-21 21:04:54 +00:00
import (
"strings"
"github.com/mitchellh/cli"
)
2016-12-05 05:22:13 +00:00
type JobCommand struct {
Meta
}
func (f *JobCommand) Help() string {
2018-03-21 21:04:54 +00:00
helpText := `
Usage: nomad job <subcommand> [options] [args]
This command groups subcommands for interacting with jobs.
Run a new job or update an existing job:
$ nomad job run <path>
Plan the run of a job to determine what changes would occur:
$ nomad job plan <path>
Stop a running job:
$ nomad job stop <name>
Examine the status of a running job:
$ nomad job status <name>
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
2016-12-05 05:22:13 +00:00
}
func (f *JobCommand) Synopsis() string {
return "Interact with jobs"
}
func (f *JobCommand) Name() string { return "job" }
2016-12-05 05:22:13 +00:00
func (f *JobCommand) Run(args []string) int {
return cli.RunResultHelp
}