Skip to content

Commit

Permalink
Documentation for nomad job history additions
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Sep 24, 2024
1 parent 7cbb7b8 commit 81b3e44
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions website/content/docs/commands/job/history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ run the command with a job prefix instead of the exact job ID.
- `-version`: Display only the history for the given version.
- `-json` : Output the job versions in its JSON format.
- `-t` : Format and display the job versions using a Go template.
- `-diff-version`: Compare the job with a specific version.
- `-diff-tag`: Compare the job with a specific tag.


## Examples

Expand Down Expand Up @@ -81,3 +84,60 @@ v2: 512
v1: 256
v0: 256
```

Compare the current job with a specific older version:

```shell-session
$ nomad job history -version=3 -diff-version=1 example
Version = 3
Stable = false
Submit Date = 07/25/17 20:35:43 UTC
Diff =
+/- Job: "example"
+/- Task Group: "cache"
+/- Task: "redis"
+/- Resources {
CPU: "500"
DiskMB: "0"
+/- MemoryMB: "256" => "512"
}
```

Compare all job versions with a specific version by tag name:

```shell-session
$ nomad job history -diff-tag=low-energy-version example
Version = 3
Stable = false
Submit Date = 2024-09-09T16:41:53-04:00
Diff =
+/- Job: "example"
+/- Task Group: "group"
+/- Count: "3" => "4"
Task: "task"
Version = 2
Stable = false
Submit Date = 2024-09-09T16:41:53-04:00
Tag Name = low-energy-version
Tag Description = test description
Version = 1
Stable = false
Submit Date = 2024-09-09T16:41:53-04:00
Diff =
+/- Job: "example"
+/- Task Group: "group"
+/- Count: "3" => "2"
Task: "task"
Version = 0
Stable = false
Submit Date = 2024-09-09T16:41:53-04:00
Diff =
+/- Job: "example"
+/- Task Group: "group"
+/- Count: "3" => "1"
Task: "task"
```

0 comments on commit 81b3e44

Please sign in to comment.