Commit 4eceda3
committed
stack status cmd - add columns for image build date and VCS reference
When dealing with snapshot builds that are constantly updated, it's difficult to know what
build of a service is really running. When viewing historic build logs from CI this information
is important to know.
This adds information about the service to the output of `elastic-package stack status`. The data
is read from http://label-schema.org/rc1/ labels. It uses the org.label-schema.build-date and
org.label-schema.vcs-ref labels.
```
BEFORE:
╭──────────────────┬─────────────────┬─────────────────────╮
│ SERVICE │ VERSION │ STATUS │
├──────────────────┼─────────────────┼─────────────────────┤
│ elastic-agent │ 8.16.0-SNAPSHOT │ running (unhealthy) │
│ elasticsearch │ 8.16.0-SNAPSHOT │ running (healthy) │
│ fleet-server │ 8.16.0-SNAPSHOT │ running (healthy) │
│ kibana │ 8.16.0-SNAPSHOT │ running (healthy) │
│ package-registry │ latest │ running (healthy) │
╰──────────────────┴─────────────────┴─────────────────────╯
```
```
AFTER:
╭──────────────────┬─────────────────┬─────────────────────┬───────────────────┬────────────╮
│ SERVICE │ VERSION │ STATUS │ IMAGE BUILD DATE │ VCS REF │
├──────────────────┼─────────────────┼─────────────────────┼───────────────────┼────────────┤
│ elastic-agent │ 8.16.0-SNAPSHOT │ running (unhealthy) │ 2024-08-22T02:44Z │ b96a4ca8fa │
│ elasticsearch │ 8.16.0-SNAPSHOT │ running (healthy) │ 2024-08-22T13:26Z │ 1362d56865 │
│ fleet-server │ 8.16.0-SNAPSHOT │ running (healthy) │ 2024-08-22T02:44Z │ b96a4ca8fa │
│ kibana │ 8.16.0-SNAPSHOT │ running (healthy) │ 2024-08-22T11:09Z │ cdcdfddd3f │
│ package-registry │ latest │ running (healthy) │ │ │
╰──────────────────┴─────────────────┴─────────────────────┴───────────────────┴────────────╯
```1 parent 0d3c215 commit 4eceda3
File tree
4 files changed
+28
-2
lines changed- cmd
- internal
- docker
- stack
4 files changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | | - | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | | - | |
| 357 | + | |
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
0 commit comments