2017-07-25 18:18:21 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: job deployments'
|
|
|
|
sidebar_title: deployments
|
|
|
|
description: |
|
2017-07-25 18:18:21 +00:00
|
|
|
The deployments command is used to list deployments for a job.
|
|
|
|
---
|
|
|
|
|
|
|
|
# Command: job deployments
|
|
|
|
|
2018-03-30 00:52:35 +00:00
|
|
|
The `job deployments` command is used to display the deployments for a
|
|
|
|
particular job.
|
2017-07-25 18:18:21 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```plaintext
|
2017-07-25 18:18:21 +00:00
|
|
|
nomad job deployments [options] <job>
|
|
|
|
```
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
The `job deployments` command requires a single argument, the job ID or an ID
|
|
|
|
prefix of a job to display the list of deployments for.
|
2017-07-25 18:18:21 +00:00
|
|
|
|
|
|
|
## General Options
|
|
|
|
|
2020-02-06 23:45:31 +00:00
|
|
|
@include 'general_options.mdx'
|
2017-07-25 18:18:21 +00:00
|
|
|
|
|
|
|
## Deployment Options
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-latest`: Display the latest deployment only.
|
2017-07-25 18:18:21 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-json` : Output the deployment in its JSON format.
|
2017-07-25 18:18:21 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-t` : Format and display the deployment using a Go template.
|
2017-07-25 18:18:21 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-verbose`: Show full information.
|
2017-07-25 18:18:21 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-all`: Display all deployments matching the job ID, even those from an
|
|
|
|
older instance of the job.
|
2019-05-14 21:13:59 +00:00
|
|
|
|
2017-07-25 18:18:21 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
List the deployment for a particular job:
|
|
|
|
|
2020-05-01 20:02:21 +00:00
|
|
|
```shell-sessionnomad job deployments example
|
2017-07-25 18:18:21 +00:00
|
|
|
ID Job ID Job Version Status Description
|
2019-06-04 17:45:44 +00:00
|
|
|
0b23b149 example 1 running Deployment is running but requires manual promotion
|
2017-07-25 18:18:21 +00:00
|
|
|
06ca68a2 example 0 successful Deployment completed successfully
|
|
|
|
```
|