Skip to content

Commit 73a4970

Browse files
authored
feat(containers): add triggers for containers API (#3232)
1 parent a5daf5f commit 73a4970

File tree

6 files changed

+44
-3
lines changed

6 files changed

+44
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Trigger management commands.
4+
5+
USAGE:
6+
scw container trigger
7+
8+
FLAGS:
9+
-h, --help help for trigger
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-container-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ AVAILABLE COMMANDS:
1111
domain Domain management commands
1212
namespace Namespace management commands
1313
token Token management commands
14+
trigger Trigger management commands
1415

1516
WORKFLOW COMMANDS:
1617
deploy Deploy a container

docs/commands/container.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Serverless Containers API.
3333
- [Delete a token](#delete-a-token)
3434
- [Get a token](#get-a-token)
3535
- [List all tokens](#list-all-tokens)
36+
- [Trigger management commands](#trigger-management-commands)
3637

3738

3839
## Container management commands
@@ -657,3 +658,17 @@ scw container token list [arg=value ...]
657658

658659

659660

661+
## Trigger management commands
662+
663+
Trigger management commands.
664+
665+
Trigger management commands.
666+
667+
**Usage:**
668+
669+
```
670+
scw container trigger
671+
```
672+
673+
674+

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/moby/buildkit v0.11.6
2525
github.com/opencontainers/go-digest v1.0.0
2626
github.com/pkg/errors v0.9.1
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230619154501-6a12f2ddaa47
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230621092234-e6b367eed6a4
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.7.0
3030
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
497497
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
498498
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
499499
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
500-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230619154501-6a12f2ddaa47 h1:eGARFgFhRDgxFF6QwimHe+MV21xhuPKLPNhJyML3JkA=
501-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230619154501-6a12f2ddaa47/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
500+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230621092234-e6b367eed6a4 h1:qFlORTA+ndCi1IRg66KTkU0eii2EBYEpXASKyB208gc=
501+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230621092234-e6b367eed6a4/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
502502
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
503503
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
504504
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/namespaces/container/v1beta1/container_cli.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func GetGeneratedCommands() *core.Commands {
2525
containerCron(),
2626
containerDomain(),
2727
containerToken(),
28+
containerTrigger(),
2829
containerNamespaceList(),
2930
containerNamespaceGet(),
3031
containerNamespaceCreate(),
@@ -105,6 +106,15 @@ func containerToken() *core.Command {
105106
}
106107
}
107108

109+
func containerTrigger() *core.Command {
110+
return &core.Command{
111+
Short: `Trigger management commands`,
112+
Long: `Trigger management commands.`,
113+
Namespace: "container",
114+
Resource: "trigger",
115+
}
116+
}
117+
108118
func containerNamespaceList() *core.Command {
109119
return &core.Command{
110120
Short: `List all your namespaces`,

0 commit comments

Comments
 (0)