Skip to content

Commit 13dc9e9

Browse files
feat(apple_silicon): add CI-CD runner configuration update API (#5161)
Co-authored-by: Jonathan Remy <[email protected]>
1 parent 27dbec4 commit 13dc9e9

File tree

4 files changed

+35
-19
lines changed

4 files changed

+35
-19
lines changed

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ USAGE:
66
scw apple-silicon server create [arg=value ...]
77

88
ARGS:
9-
[name=<generated>] Create a server with this given name
10-
[project-id] Project ID to use. If none is passed the default project ID will be used
11-
[type] Create a server of the given type
12-
[os-id] Create a server with the given os_id
13-
[enable-vpc] Activate the Private Network feature for this server
14-
[commitment-type] Activate commitment for this server (duration_24h | renewed_monthly | none)
15-
[public-bandwidth-bps] Public bandwidth to configure for this server. Expressed in bits per second.
16-
[runner-configuration.name]
17-
[runner-configuration.url]
18-
[runner-configuration.token]
19-
[runner-configuration.provider] (unknown_provider | github | gitlab)
20-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
9+
[name=<generated>] Create a server with this given name
10+
[project-id] Project ID to use. If none is passed the default project ID will be used
11+
[type] Create a server of the given type
12+
[os-id] Create a server with the given os_id
13+
[enable-vpc] Activate the Private Network feature for this server
14+
[commitment-type] Activate commitment for this server (duration_24h | renewed_monthly | none)
15+
[public-bandwidth-bps] Public bandwidth to configure for this server. Expressed in bits per second.
16+
[runner-configuration.name]
17+
[runner-configuration.url]
18+
[runner-configuration.token]
19+
[runner-configuration.provider] (unknown_provider | github | gitlab)
20+
[applied-runner-configurations.runner-configuration-ids.{index}]
21+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
2122

2223
FLAGS:
2324
-h, --help help for create

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ USAGE:
66
scw apple-silicon server update <server-id ...> [arg=value ...]
77

88
ARGS:
9-
server-id UUID of the server you want to update
10-
[name] Updated name for your server
11-
[schedule-deletion] Specify whether the server should be flagged for automatic deletion
12-
[enable-vpc] Activate or deactivate Private Network support for this server
13-
[commitment-type.commitment-type] (duration_24h | renewed_monthly | none)
14-
[public-bandwidth-bps] Public bandwidth configured for this server
15-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
9+
server-id UUID of the server you want to update
10+
[name] Updated name for your server
11+
[schedule-deletion] Specify whether the server should be flagged for automatic deletion
12+
[enable-vpc] Activate or deactivate Private Network support for this server
13+
[commitment-type.commitment-type] (duration_24h | renewed_monthly | none)
14+
[public-bandwidth-bps] Public bandwidth configured for this server
15+
[applied-runner-configurations.runner-configuration-ids.{index}]
16+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
1617

1718
FLAGS:
1819
-h, --help help for update

docs/commands/apple-silicon.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ scw apple-silicon server create [arg=value ...]
201201
| runner-configuration.url | | |
202202
| runner-configuration.token | | |
203203
| runner-configuration.provider | One of: `unknown_provider`, `github`, `gitlab` | |
204+
| applied-runner-configurations.runner-configuration-ids.{index} | | |
204205
| 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 |
205206

206207

@@ -352,6 +353,7 @@ scw apple-silicon server update <server-id ...> [arg=value ...]
352353
| enable-vpc | | Activate or deactivate Private Network support for this server |
353354
| commitment-type.commitment-type | One of: `duration_24h`, `renewed_monthly`, `none` | |
354355
| public-bandwidth-bps | | Public bandwidth configured for this server |
356+
| applied-runner-configurations.runner-configuration-ids.{index} | | |
355357
| 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 |
356358

357359

internal/namespaces/applesilicon/v1alpha1/applesilicon_cli.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ func appleSiliconServerCreate() *core.Command {
232232
"gitlab",
233233
},
234234
},
235+
{
236+
Name: "applied-runner-configurations.runner-configuration-ids.{index}",
237+
Required: false,
238+
Deprecated: false,
239+
Positional: false,
240+
},
235241
core.ZoneArgSpec(scw.ZoneFrPar3),
236242
},
237243
Run: func(ctx context.Context, args any) (i any, e error) {
@@ -470,6 +476,12 @@ func appleSiliconServerUpdate() *core.Command {
470476
Deprecated: false,
471477
Positional: false,
472478
},
479+
{
480+
Name: "applied-runner-configurations.runner-configuration-ids.{index}",
481+
Required: false,
482+
Deprecated: false,
483+
Positional: false,
484+
},
473485
core.ZoneArgSpec(scw.ZoneFrPar3),
474486
},
475487
Run: func(ctx context.Context, args any) (i any, e error) {

0 commit comments

Comments
 (0)