Skip to content

Commit 57eaebd

Browse files
Alexandre CatalanAlexandre Catalan
authored andcommitted
docs(container-registry): expand examples covering all flags in artifactory create and update
Add comprehensive command examples covering every available flag (both required and optional) for artifactory create and update commands, including unauthenticated proxies, proxy descriptions, and secret handling via stdin and file paths. Regenerate command documentation. Relates to STACKITCRE-382
1 parent 61124ce commit 57eaebd

4 files changed

Lines changed: 51 additions & 15 deletions

File tree

‎docs/stackit_container-registry_artifactory_create.md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,23 @@ stackit container-registry artifactory create [flags]
1313
### Examples
1414

1515
```
16-
Create an artifactory with name "my-registry"
16+
Create a standard artifactory
1717
$ stackit container-registry artifactory create --name my-registry
1818
1919
Create a proxy-cache artifactory without credentials
2020
$ stackit container-registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor
2121
22-
Create a proxy-cache artifactory for Docker Hub, reading secret from stdin
23-
$ stackit container-registry artifactory create --name docker-proxy --proxy-url https://registry-1.docker.io --proxy-registry-type docker-hub --proxy-access-key my-user --proxy-access-secret -
22+
Create a proxy-cache artifactory with a description
23+
$ stackit container-registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor --proxy-description "Internal mirror"
2424
25-
Create a proxy-cache artifactory with credentials, reading secret from stdin
26-
$ stackit container-registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor --proxy-access-key my-user --proxy-access-secret -
25+
Create a proxy-cache artifactory for Docker Hub with credentials from stdin
26+
$ stackit container-registry artifactory create --name docker-proxy --proxy-url https://registry-1.docker.io --proxy-registry-type docker-hub --proxy-access-key my-user --proxy-access-secret -
2727
28-
Create a proxy-cache artifactory with credentials, providing the path to a file with the secret
28+
Create a proxy-cache artifactory with credentials from a file
2929
$ stackit container-registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor --proxy-access-key my-user --proxy-access-secret @./secret.txt
30+
31+
Create a proxy-cache artifactory with all proxy options configured
32+
$ stackit container-registry artifactory create --name docker-proxy --proxy-url https://registry-1.docker.io --proxy-registry-type docker-hub --proxy-description "Docker Hub mirror" --proxy-access-key my-user --proxy-access-secret @./secret.txt
3033
```
3134

3235
### Options

‎docs/stackit_container-registry_artifactory_update.md‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,20 @@ stackit container-registry artifactory update ARTIFACTORY_ID [flags]
1313
### Examples
1414

1515
```
16-
Update the proxy configuration for an artifactory with ID "xxx"
16+
Update the upstream proxy URL for an artifactory with ID "xxx"
1717
$ stackit container-registry artifactory update xxx --proxy-url https://registry-1.docker.io
18+
19+
Update the proxy description for an artifactory with ID "xxx"
20+
$ stackit container-registry artifactory update xxx --proxy-description "Updated proxy description"
21+
22+
Update the proxy credentials reading secret from stdin for an artifactory with ID "xxx"
23+
$ stackit container-registry artifactory update xxx --proxy-access-key my-user --proxy-access-secret -
24+
25+
Update the proxy credentials providing path to a file with secret for an artifactory with ID "xxx"
26+
$ stackit container-registry artifactory update xxx --proxy-access-key my-user --proxy-access-secret @./secret.txt
27+
28+
Update all proxy configuration fields for an artifactory with ID "xxx"
29+
$ stackit container-registry artifactory update xxx --proxy-url https://custom-registry.com --proxy-description "Updated mirror" --proxy-access-key my-user --proxy-access-secret @./secret.txt
1830
```
1931

2032
### Options

‎internal/cmd/container-registry/artifactory/create/create.go‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,29 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
4848
Args: args.NoArgs,
4949
Example: examples.Build(
5050
examples.NewExample(
51-
`Create an artifactory with name "my-registry"`,
51+
`Create a standard artifactory`,
5252
"$ stackit container-registry artifactory create --name my-registry",
5353
),
5454
examples.NewExample(
5555
`Create a proxy-cache artifactory without credentials`,
5656
"$ stackit container-registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor",
5757
),
5858
examples.NewExample(
59-
`Create a proxy-cache artifactory for Docker Hub, reading secret from stdin`,
60-
"$ stackit container-registry artifactory create --name docker-proxy --proxy-url https://registry-1.docker.io --proxy-registry-type docker-hub --proxy-access-key my-user --proxy-access-secret -",
59+
`Create a proxy-cache artifactory with a description`,
60+
`$ stackit container-registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor --proxy-description "Internal mirror"`,
6161
),
6262
examples.NewExample(
63-
`Create a proxy-cache artifactory with credentials, reading secret from stdin`,
64-
"$ stackit container-registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor --proxy-access-key my-user --proxy-access-secret -",
63+
`Create a proxy-cache artifactory for Docker Hub with credentials from stdin`,
64+
"$ stackit container-registry artifactory create --name docker-proxy --proxy-url https://registry-1.docker.io --proxy-registry-type docker-hub --proxy-access-key my-user --proxy-access-secret -",
6565
),
6666
examples.NewExample(
67-
`Create a proxy-cache artifactory with credentials, providing the path to a file with the secret`,
67+
`Create a proxy-cache artifactory with credentials from a file`,
6868
"$ stackit container-registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor --proxy-access-key my-user --proxy-access-secret @./secret.txt",
6969
),
70+
examples.NewExample(
71+
`Create a proxy-cache artifactory with all proxy options configured`,
72+
`$ stackit container-registry artifactory create --name docker-proxy --proxy-url https://registry-1.docker.io --proxy-registry-type docker-hub --proxy-description "Docker Hub mirror" --proxy-access-key my-user --proxy-access-secret @./secret.txt`,
73+
),
7074
),
7175
RunE: func(cmd *cobra.Command, args []string) error {
7276
ctx := context.Background()

‎internal/cmd/container-registry/artifactory/update/update.go‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,25 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
4747
Args: args.SingleArg(artifactoryIdArg, utils.ValidateUUID),
4848
Example: examples.Build(
4949
examples.NewExample(
50-
`Update the proxy configuration for an artifactory with ID "xxx"`,
51-
"$ stackit container-registry artifactory update xxx --proxy-url https://registry-1.docker.io"),
50+
`Update the upstream proxy URL for an artifactory with ID "xxx"`,
51+
"$ stackit container-registry artifactory update xxx --proxy-url https://registry-1.docker.io",
52+
),
53+
examples.NewExample(
54+
`Update the proxy description for an artifactory with ID "xxx"`,
55+
`$ stackit container-registry artifactory update xxx --proxy-description "Updated proxy description"`,
56+
),
57+
examples.NewExample(
58+
`Update the proxy credentials reading secret from stdin for an artifactory with ID "xxx"`,
59+
"$ stackit container-registry artifactory update xxx --proxy-access-key my-user --proxy-access-secret -",
60+
),
61+
examples.NewExample(
62+
`Update the proxy credentials providing path to a file with secret for an artifactory with ID "xxx"`,
63+
"$ stackit container-registry artifactory update xxx --proxy-access-key my-user --proxy-access-secret @./secret.txt",
64+
),
65+
examples.NewExample(
66+
`Update all proxy configuration fields for an artifactory with ID "xxx"`,
67+
`$ stackit container-registry artifactory update xxx --proxy-url https://custom-registry.com --proxy-description "Updated mirror" --proxy-access-key my-user --proxy-access-secret @./secret.txt`,
68+
),
5269
),
5370
RunE: func(cmd *cobra.Command, args []string) error {
5471
ctx := context.Background()

0 commit comments

Comments
 (0)