Skip to content

Commit 5c090b6

Browse files
authored
Merge pull request #2652 from saucelabs/DEVX-2749-part4
docs: Add docs for saucectl imagerunner cli
2 parents 6e436f5 + c945a00 commit 5c090b6

File tree

6 files changed

+313
-15
lines changed

6 files changed

+313
-15
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
id: artifacts-download
3+
title: saucectl imagerunner artifacts download
4+
sidebar_label: artifacts download
5+
---
6+
7+
Get artifacts/files of the container from a Sauce Orchestrate run. Only the files specified in `artifacts` configuration are downloaded. Supports glob pattern.
8+
9+
## Usage
10+
11+
```bash
12+
$ saucectl imagerunner artifacts download <runID> <globPattern> [flags]
13+
```
14+
15+
## Available Options
16+
17+
<table id="table-cli">
18+
<thead>
19+
<tr>
20+
<th width="30%">Flag</th>
21+
<th width="10%">Shorthand</th>
22+
<th>Description</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr>
27+
<td><span className="t-cli"><a href="#--target-dir">--target-dir</a></span></td>
28+
<td><span className="t-cli">None</span></td>
29+
<td>Save files to target directory. Defaults to current working directory.</td>
30+
</tr>
31+
<tr>
32+
<td><span className="t-cli"><a href="#--out">--out</a></span></td>
33+
<td><span className="t-cli">-o</span></td>
34+
<td>Output format to the console. Options: <code>text</code> (default) and <code>json</code>.</td>
35+
</tr>
36+
<tr>
37+
<td><span className="t-cli"><a href="#--region">--region</a></span></td>
38+
<td><span className="t-cli">-r</span></td>
39+
<td>The Sauce Labs region. Options are <code>us-west-1</code> (default) and <code>eu-central-1</code>.</td>
40+
</tr>
41+
</tbody>
42+
</table>
43+
44+
## Options Details
45+
46+
### <span className="cli">--target-dir</span>
47+
48+
<div className="cli-desc">
49+
<p><small>| OPTIONAL | STRING |</small></p>
50+
51+
Save files to target directory. Defaults to current working directory.
52+
53+
```bash
54+
saucectl imagerunner artifacts download <runID> <globPattern> --target-dir my-artifacts-dir
55+
```
56+
57+
</div>
58+
59+
### <span className="cli">--out</span>
60+
61+
<div className="cli-desc">
62+
<p><small>| OPTIONAL | STRING |</small></p>
63+
64+
Specifies the output format for the console. Options include: "text" or "json". The default setting is "text".
65+
66+
**Shorthand:** `-o <text/json>`
67+
68+
```bash
69+
saucectl imagerunner artifacts download <runID> <globPattern> --out json
70+
```
71+
72+
</div>
73+
74+
### <span className="cli">--region</span>
75+
76+
<div className="cli-desc">
77+
<p><small>| OPTIONAL | STRING |</small></p>
78+
79+
The Sauce Labs region. Options are `us-west-1` (default) and `eu-central-1`.
80+
81+
**Shorthand:** `-r <region>`
82+
83+
```bash
84+
saucectl imagerunner artifacts download <runID> <globPattern> --region us-west-1
85+
```
86+
87+
</div>
+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
id: list
3+
title: saucectl imagerunner list
4+
sidebar_label: list
5+
---
6+
7+
Returns the list of Sauce Orchestrate containers.
8+
9+
## Usage
10+
11+
```bash
12+
$ saucectl imagerunner list [flags]
13+
```
14+
15+
## Available Options
16+
17+
<table id="table-cli">
18+
<thead>
19+
<tr>
20+
<th width="30%">Flag</th>
21+
<th width="10%">Shorthand</th>
22+
<th>Description</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr>
27+
<td><span className="t-cli"><a href="#--out">--out</a></span></td>
28+
<td><span className="t-cli">-o</span></td>
29+
<td>Output format to the console. Options: <code>text</code> (default) and <code>json</code>.</td>
30+
</tr>
31+
<tr>
32+
<td><span className="t-cli"><a href="#--region">--region</a></span></td>
33+
<td><span className="t-cli">-r</span></td>
34+
<td>The Sauce Labs region. Options are <code>us-west-1</code> (default) and <code>eu-central-1</code>.</td>
35+
</tr>
36+
</tbody>
37+
</table>
38+
39+
## Options Details
40+
41+
### <span className="cli">--out</span>
42+
43+
<div className="cli-desc">
44+
<p><small>| OPTIONAL | STRING |</small></p>
45+
46+
Specifies the output format for the console. Options include: "text" or "json". The default setting is "text".
47+
48+
**Shorthand:** `-o <text/json>`
49+
50+
```bash
51+
saucectl imagerunner list --out json
52+
```
53+
54+
</div>
55+
56+
### <span className="cli">--region</span>
57+
58+
<div className="cli-desc">
59+
<p><small>| OPTIONAL | STRING |</small></p>
60+
61+
The Sauce Labs region. Options are `us-west-1` (default) and `eu-central-1`.
62+
63+
**Shorthand:** `-r <region>`
64+
65+
```bash
66+
saucectl imagerunner list --region us-west-1
67+
```
68+
69+
</div>
+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
id: logs
3+
title: saucectl imagerunner logs
4+
sidebar_label: logs
5+
---
6+
7+
Fetches the logs from an imagerunner run.
8+
9+
## Usage
10+
11+
```bash
12+
$ saucectl imagerunner logs <runID> [flags]
13+
```
14+
15+
## Available Options
16+
17+
<table id="table-cli">
18+
<thead>
19+
<tr>
20+
<th width="30%">Flag</th>
21+
<th width="10%">Shorthand</th>
22+
<th>Description</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr>
27+
<td><span className="t-cli"><a href="#--live">--live</a></span></td>
28+
<td><span className="t-cli">None</span></td>
29+
<td>Tail the live log output from a running Sauce Orchestrate container. Defaults to `false`.</td>
30+
</tr>
31+
<tr>
32+
<td><span className="t-cli"><a href="#--region">--region</a></span></td>
33+
<td><span className="t-cli">-r</span></td>
34+
<td>The Sauce Labs region. Options are <code>us-west-1</code> (default) and <code>eu-central-1</code>.</td>
35+
</tr>
36+
</tbody>
37+
</table>
38+
39+
## Options Details
40+
41+
### <span className="cli">--live</span>
42+
43+
<div className="cli-desc">
44+
<p><small>| OPTIONAL | BOOLEAN |</small></p>
45+
46+
Tail the live log output from a running Sauce Orchestrate container.
47+
48+
```bash
49+
saucectl imagerunner logs <runID> --live
50+
```
51+
52+
</div>
53+
54+
### <span className="cli">--region</span>
55+
56+
<div className="cli-desc">
57+
<p><small>| OPTIONAL | STRING |</small></p>
58+
59+
The Sauce Labs region. Options are `us-west-1` (default) and `eu-central-1`.
60+
61+
**Shorthand:** `-r <region>`
62+
63+
```bash
64+
saucectl imagerunner logs <runID> --region us-west-1
65+
```
66+
67+
</div>
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
id: stop
3+
title: saucectl imagerunner stop
4+
sidebar_label: stop
5+
---
6+
7+
Stops a running Sauce Orchestrate container.
8+
9+
## Usage
10+
11+
```bash
12+
$ saucectl imagerunner stop <runID> [flags]
13+
```
14+
15+
## Available Options
16+
17+
<table id="table-cli">
18+
<thead>
19+
<tr>
20+
<th width="30%">Flag</th>
21+
<th width="10%">Shorthand</th>
22+
<th>Description</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr>
27+
<td><span className="t-cli"><a href="#--region">--region</a></span></td>
28+
<td><span className="t-cli">-r</span></td>
29+
<td>The Sauce Labs region. Options are <code>us-west-1</code> (default) and <code>eu-central-1</code>.</td>
30+
</tr>
31+
</tbody>
32+
</table>
33+
34+
## Options Details
35+
36+
### <span className="cli">--region</span>
37+
38+
<div className="cli-desc">
39+
<p><small>| OPTIONAL | STRING |</small></p>
40+
41+
The Sauce Labs region. Options are `us-west-1` (default) and `eu-central-1`.
42+
43+
**Shorthand:** `-r <region>`
44+
45+
```bash
46+
saucectl imagerunner stop <runID> --region us-west-1
47+
```
48+
49+
</div>

docs/orchestrate/saucectl-configuration.md

+30-15
Original file line numberDiff line numberDiff line change
@@ -460,18 +460,33 @@ The main command to run a Sauce Orchestrate job. Must be executed at the root le
460460
saucectl run
461461
```
462462

463-
### `saucectl imagerunner logs`
464-
465-
Get logs of the container from a Sauce Orchestrate run.
466-
467-
```bash
468-
saucectl imagerunner logs <runID>
469-
```
470-
471-
### `saucectl imagerunner artifacts`
472-
473-
Get artifacts/files of the container from a Sauce Orchestrate run. Only the files specified in `artifacts` configuration are downloaded.
474-
475-
```bash
476-
saucectl imagerunner artifacts <runID>
477-
```
463+
### `saucectl imagerunner` Commands
464+
465+
Supported commands:
466+
467+
<table id="table-cli">
468+
<thead>
469+
<tr>
470+
<th>Operation</th>
471+
<th>Description</th>
472+
</tr>
473+
</thead>
474+
<tbody>
475+
<tr>
476+
<td><a href="/dev/cli/saucectl/imagerunner/artifacts-download">Get artifacts</a></td>
477+
<td>Get artifacts/files of the container from a Sauce Orchestrate run.</td>
478+
</tr>
479+
<tr>
480+
<td><a href="/dev/cli/saucectl/imagerunner/list">List containers</a></td>
481+
<td>Return the list of Sauce Orchestrate containers.</td>
482+
</tr>
483+
<tr>
484+
<td><a href="/dev/cli/saucectl/imagerunner/logs">Get logs</a></td>
485+
<td>Fetch the logs from an imagerunner run.</td>
486+
</tr>
487+
<tr>
488+
<td><a href="/dev/cli/saucectl/imagerunner/stop">Stop a container</a></td>
489+
<td>Stop a running Sauce Orchestrate container.</td>
490+
</tr>
491+
</tbody>
492+
</table>

sidebars.js

+11
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,17 @@ module.exports = {
789789
collapsed: true,
790790
items: ['dev/cli/saucectl/docker/push'],
791791
},
792+
{
793+
type: 'category',
794+
label: 'saucectl imagerunner',
795+
collapsed: true,
796+
items: [
797+
'dev/cli/saucectl/imagerunner/artifacts-download',
798+
'dev/cli/saucectl/imagerunner/list',
799+
'dev/cli/saucectl/imagerunner/logs',
800+
'dev/cli/saucectl/imagerunner/stop',
801+
],
802+
},
792803
'dev/cli/saucectl/init',
793804
{
794805
type: 'category',

0 commit comments

Comments
 (0)