Skip to content

Commit da7f67c

Browse files
authored
feat(apple_silicon): enable runner management in cli (#5201)
1 parent b4e3cc4 commit da7f67c

11 files changed

+552
-3
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new runner configuration.
4+
5+
USAGE:
6+
scw apple-silicon runner create [arg=value ...]
7+
8+
ARGS:
9+
[project-id] Project ID to use. If none is passed the default project ID will be used
10+
[runner-configuration.name]
11+
[runner-configuration.provider] (unknown_provider | github | gitlab)
12+
[runner-configuration.github-configuration.url]
13+
[runner-configuration.github-configuration.token]
14+
[runner-configuration.github-configuration.labels.{index}]
15+
[runner-configuration.gitlab-configuration.url]
16+
[runner-configuration.gitlab-configuration.token]
17+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
18+
19+
FLAGS:
20+
-h, --help help for create
21+
22+
GLOBAL FLAGS:
23+
-c, --config string The path to the config file
24+
-D, --debug Enable debug mode
25+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
26+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new runner configuration.
4+
5+
USAGE:
6+
scw apple-silicon runner delete <runner-id ...> [arg=value ...]
7+
8+
ARGS:
9+
runner-id ID of the runner configuration to delete
10+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
11+
12+
FLAGS:
13+
-h, --help help for delete
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Retrieve a runner configuration.
4+
5+
USAGE:
6+
scw apple-silicon runner get <runner-id ...> [arg=value ...]
7+
8+
ARGS:
9+
runner-id ID of the runner configuration to get
10+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
11+
12+
FLAGS:
13+
-h, --help help for get
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List runner configurations associated with a server.
4+
5+
USAGE:
6+
scw apple-silicon runner list <server-id ...> [arg=value ...]
7+
8+
ARGS:
9+
server-id ID of the server for which to list applied runner configurations
10+
[project-id] Only list servers of this project ID
11+
[organization-id] Only list servers of this Organization ID
12+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3 | all)
13+
14+
FLAGS:
15+
-h, --help help for list
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new runner configuration.
4+
5+
USAGE:
6+
scw apple-silicon runner update <runner-id ...> [arg=value ...]
7+
8+
ARGS:
9+
runner-id ID of the runner configuration to update
10+
[runner-configuration.name]
11+
[runner-configuration.provider] (unknown_provider | github | gitlab)
12+
[runner-configuration.github-configuration.url]
13+
[runner-configuration.github-configuration.token]
14+
[runner-configuration.github-configuration.labels.{index}]
15+
[runner-configuration.gitlab-configuration.url]
16+
[runner-configuration.gitlab-configuration.token]
17+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
18+
19+
FLAGS:
20+
-h, --help help for update
21+
22+
GLOBAL FLAGS:
23+
-c, --config string The path to the config file
24+
-D, --debug Enable debug mode
25+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
26+
-p, --profile string The config profile to use
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Runner management commands.
4+
5+
USAGE:
6+
scw apple-silicon runner <command>
7+
8+
AVAILABLE COMMANDS:
9+
create Create a new runner configuration
10+
delete Create a new runner configuration
11+
get Retrieve a runner configuration
12+
list List runner configurations associated with a server
13+
update Create a new runner configuration
14+
15+
FLAGS:
16+
-h, --help help for runner
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
23+
24+
Use "scw apple-silicon runner [command] --help" for more information about a command.

cmd/scw/testdata/test-all-usage-apple-silicon-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ USAGE:
88
AVAILABLE COMMANDS:
99
os OS management commands
1010
private-network Private network management command
11+
runner Runner management commands
1112
server Apple silicon management commands
1213
server-type Server-Types management commands
1314

docs/commands/apple-silicon.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Apple silicon API.
1010
- [Delete a Private Network](#delete-a-private-network)
1111
- [List the Private Networks of a server](#list-the-private-networks-of-a-server)
1212
- [Set multiple Private Networks on a server](#set-multiple-private-networks-on-a-server)
13+
- [Runner management commands](#runner-management-commands)
14+
- [Create a new runner configuration](#create-a-new-runner-configuration)
15+
- [Create a new runner configuration](#create-a-new-runner-configuration)
16+
- [Retrieve a runner configuration](#retrieve-a-runner-configuration)
17+
- [List runner configurations associated with a server](#list-runner-configurations-associated-with-a-server)
18+
- [Create a new runner configuration](#create-a-new-runner-configuration)
1319
- [Apple silicon management commands](#apple-silicon-management-commands)
1420
- [Create a server](#create-a-server)
1521
- [Delete a server](#delete-a-server)
@@ -170,6 +176,127 @@ scw apple-silicon private-network set [arg=value ...]
170176

171177

172178

179+
## Runner management commands
180+
181+
Runner management commands.
182+
183+
184+
### Create a new runner configuration
185+
186+
Create a new runner configuration.
187+
188+
**Usage:**
189+
190+
```
191+
scw apple-silicon runner create [arg=value ...]
192+
```
193+
194+
195+
**Args:**
196+
197+
| Name | | Description |
198+
|------|---|-------------|
199+
| project-id | | Project ID to use. If none is passed the default project ID will be used |
200+
| runner-configuration.name | | |
201+
| runner-configuration.provider | One of: `unknown_provider`, `github`, `gitlab` | |
202+
| runner-configuration.github-configuration.url | | |
203+
| runner-configuration.github-configuration.token | | |
204+
| runner-configuration.github-configuration.labels.{index} | | |
205+
| runner-configuration.gitlab-configuration.url | | |
206+
| runner-configuration.gitlab-configuration.token | | |
207+
| zone | Default: `fr-par-1`<br />One of: `fr-par-3` | Zone to target. If none is passed will use default zone from the config |
208+
209+
210+
211+
### Create a new runner configuration
212+
213+
Create a new runner configuration.
214+
215+
**Usage:**
216+
217+
```
218+
scw apple-silicon runner delete <runner-id ...> [arg=value ...]
219+
```
220+
221+
222+
**Args:**
223+
224+
| Name | | Description |
225+
|------|---|-------------|
226+
| runner-id | Required | ID of the runner configuration to delete |
227+
| zone | Default: `fr-par-1`<br />One of: `fr-par-3` | Zone to target. If none is passed will use default zone from the config |
228+
229+
230+
231+
### Retrieve a runner configuration
232+
233+
Retrieve a runner configuration.
234+
235+
**Usage:**
236+
237+
```
238+
scw apple-silicon runner get <runner-id ...> [arg=value ...]
239+
```
240+
241+
242+
**Args:**
243+
244+
| Name | | Description |
245+
|------|---|-------------|
246+
| runner-id | Required | ID of the runner configuration to get |
247+
| zone | Default: `fr-par-1`<br />One of: `fr-par-3` | Zone to target. If none is passed will use default zone from the config |
248+
249+
250+
251+
### List runner configurations associated with a server
252+
253+
List runner configurations associated with a server.
254+
255+
**Usage:**
256+
257+
```
258+
scw apple-silicon runner list <server-id ...> [arg=value ...]
259+
```
260+
261+
262+
**Args:**
263+
264+
| Name | | Description |
265+
|------|---|-------------|
266+
| server-id | Required | ID of the server for which to list applied runner configurations |
267+
| project-id | | Only list servers of this project ID |
268+
| organization-id | | Only list servers of this Organization ID |
269+
| zone | Default: `fr-par-1`<br />One of: `fr-par-3`, `all` | Zone to target. If none is passed will use default zone from the config |
270+
271+
272+
273+
### Create a new runner configuration
274+
275+
Create a new runner configuration.
276+
277+
**Usage:**
278+
279+
```
280+
scw apple-silicon runner update <runner-id ...> [arg=value ...]
281+
```
282+
283+
284+
**Args:**
285+
286+
| Name | | Description |
287+
|------|---|-------------|
288+
| runner-id | Required | ID of the runner configuration to update |
289+
| runner-configuration.name | | |
290+
| runner-configuration.provider | One of: `unknown_provider`, `github`, `gitlab` | |
291+
| runner-configuration.github-configuration.url | | |
292+
| runner-configuration.github-configuration.token | | |
293+
| runner-configuration.github-configuration.labels.{index} | | |
294+
| runner-configuration.gitlab-configuration.url | | |
295+
| runner-configuration.gitlab-configuration.token | | |
296+
| zone | Default: `fr-par-1`<br />One of: `fr-par-3` | Zone to target. If none is passed will use default zone from the config |
297+
298+
299+
173300
## Apple silicon management commands
174301

175302
Apple silicon management commands.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.26.2
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127155323-7d5ea125dcd7
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251201083602-34ad6e238d5e
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.10.1
2929
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
464464
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
465465
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
466466
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
467-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127155323-7d5ea125dcd7 h1:ytLZVvlGeh0Naqh0XIg7H+Q+3Umbu+3K0jjiuwmQTPw=
468-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127155323-7d5ea125dcd7/go.mod h1:h/elW4JdNo225GP5FZHJ/RPyCNz79lxaeub3PyGzE9o=
467+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251201083602-34ad6e238d5e h1:GdOB9k6UI1zh3nOLmW4v/EYzK4GaWLbAsb/PixYrTts=
468+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251201083602-34ad6e238d5e/go.mod h1:h/elW4JdNo225GP5FZHJ/RPyCNz79lxaeub3PyGzE9o=
469469
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
470470
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
471471
github.com/secure-systems-lab/go-securesystemslib v0.9.1 h1:nZZaNz4DiERIQguNy0cL5qTdn9lR8XKHf4RUyG1Sx3g=

0 commit comments

Comments
 (0)