Skip to content

Commit df5d78a

Browse files
updating the porchctl cli help instructions & examples for the rpkg command (#291)
* updating the porchctl cli help instructions & examples for the rpkg commands to match with latest version * Update pkg/cli/commands/rpkg/docs/docs.go amended Co-authored-by: Fiachra Corcoran <fiachra.corcoran@est.tech> * Update pkg/cli/commands/rpkg/docs/docs.go amended Co-authored-by: Fiachra Corcoran <fiachra.corcoran@est.tech> * Update pkg/cli/commands/rpkg/docs/docs.go amended Co-authored-by: Fiachra Corcoran <fiachra.corcoran@est.tech> * Update pkg/cli/commands/rpkg/docs/docs.go amended Co-authored-by: Fiachra Corcoran <fiachra.corcoran@est.tech> --------- Co-authored-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
1 parent a161184 commit df5d78a

1 file changed

Lines changed: 74 additions & 73 deletions

File tree

pkg/cli/commands/rpkg/docs/docs.go

Lines changed: 74 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ package docs
1818

1919
var RpkgShort = `Manage packages.`
2020
var RpkgLong = `
21-
The ` + "`" + `rpkg` + "`" + ` command group contains subcommands for managing packages and revisions.
21+
The ` + "`" + `rpkg` + "`" + ` command group contains subcommands for managing packages and revisions (versions) of these packages.
2222
`
2323

2424
var ApproveShort = `Approve a proposal to publish a package revision.`
2525
var ApproveLong = `
26-
porchctl rpkg approve [PACKAGE_REV_NAME...] [flags]
26+
porchctl rpkg approve [K8S_PACKAGE_REV_NAME...] [flags]
2727
2828
Args:
2929
30-
PACKAGE_REV_NAME...:
31-
The name of one or more package revisions. If more than
30+
K8S_PACKAGE_REV_NAME...:
31+
The kubernetes name of one or more package revisions. If more than
3232
one is provided, they must be space-separated.
3333
`
3434
var ApproveExamples = `
35-
# approve package revision blueprint-91817620282c133138177d16c981cf35f0083cad
36-
$ porchctl rpkg approve blueprint-91817620282c133138177d16c981cf35f0083cad --namespace=default
35+
# approve package revision 'example-repo.example-package-name.example-workspace'
36+
$ porchctl rpkg approve example-repo.example-package-name.example-workspace --namespace=example-namespace
3737
`
3838

3939
var CloneShort = `Create a clone of an existing package revision.`
@@ -50,9 +50,9 @@ Args:
5050
oci://oci-repository/package-name
5151
* Git: A URI to a git repository must be provided.
5252
https://git-repository.git/package-name
53-
* Package: The name of a package revision already available in the
53+
* Package: The kubernetes name of a package revision already available in the
5454
repository.
55-
blueprint-e982b2196b35a4f5e81e92f49a430fe463aa9f1a
55+
example-repo.example-package-name.example-workspace
5656
5757
TARGET_PACKAGE_NAME:
5858
The name of the new package.
@@ -61,21 +61,20 @@ Args:
6161
Flags:
6262
6363
--directory
64-
Directory within the repository where the upstream
64+
Directory within the upstream repository where the upstream
6565
package revision is located. This only applies if the source package is in git
6666
or oci.
6767
6868
--ref
69-
Ref in the repository where the upstream package revision
70-
is located (branch, tag, SHA). This only applies when the source package
69+
Ref in the upstream repository where the package revision
70+
is located. This can be a branch, a tag or a SHA. This only applies when the source package
7171
is in git.
7272
7373
--repository
74-
Repository to which package revision will be cloned
75-
(downstream repository).
74+
This is the downstream repository which the package revision will be cloned to.
7675
7776
--workspace
78-
Workspace for the new package. The default value is v1.
77+
The workspace name assigned to the new downstream package revision. The default value is v1.
7978
8079
--strategy
8180
Update strategy that should be used when updating the new
@@ -93,15 +92,13 @@ Flags:
9392
where the package revision is to be created.
9493
`
9594
var CloneExamples = `
96-
# clone the blueprint-e982b2196b35a4f5e81e92f49a430fe463aa9f1a package and create a new package revision called
97-
# foo in the blueprint repository with a custom workspaceName.
98-
$ porchctl rpkg clone blueprint-e982b2196b35a4f5e81e92f49a430fe463aa9f1a foo --repository blueprint --workspace=first-draft
99-
# packclone in the porch-test repository with a v1 workspaceName, and force-delete-replace update strategy
100-
$ porchctl rpkg clone porch-test.pack.v1 packclone --namespace=porch-demo -repository=porch-test --workspace=v1 --strategy=force-delete-replace
101-
102-
# clone the git repository at https://github.com/repo/blueprint.git at reference base/v0 and in directory base. The new
103-
# package revision will be created in repository blueprint and namespace default.
104-
$ porchctl rpkg clone https://github.com/repo/blueprint.git bar --repository=blueprint --ref=base/v0 --namespace=default --directory=base
95+
# clone the 'example-repo.example-package-name.example-workspace' package and create a new package revision called
96+
# 'example-package-name-2' in the 'example-repo-2' repository with a new workspace named 'example-workspace-2' and 'force-delete-replace' update strategy.
97+
$ porchctl rpkg clone example-repo.example-package-name.example-workspace example-package-name-2 --repository=example-repo-2 --workspace=example-workspace-2 --strategy=force-delete-replace
98+
99+
# clone the git repository at 'https://github.com/repo/blueprint.git' at reference 'base/v0' and in directory base. The new
100+
# package revision will be created in repository 'blueprint' and namespace 'default'.
101+
$ porchctl rpkg clone https://github.com/repo/blueprint.git example-downstream-package --repository=blueprint --ref=base/v0 --namespace=default --directory=base
105102
`
106103

107104
var CopyShort = `Create a new package revision from an existing one.`
@@ -110,8 +107,8 @@ var CopyLong = `
110107
111108
Args:
112109
113-
SOURCE_PACKAGE_REV_NAME:
114-
The name of the package revision that will be used as the source
110+
SOURCE_K8S_PACKAGE_REV_NAME:
111+
The kubernetes name of the package revision that will be used as the source
115112
for creating a new package revision.
116113
117114
Flags:
@@ -120,33 +117,33 @@ Flags:
120117
Workspace for the new package revision.
121118
`
122119
var CopyExamples = `
123-
# create a new package from package blueprint-b47eadc99f3c525571d3834cc61b974453bc6be2
124-
$ porchctl rpkg copy blueprint-b47eadc99f3c525571d3834cc61b974453bc6be2 --workspace=v10 --namespace=default
120+
# create a new package from package 'example-repo.example-package-name.example-workspace' in the new workspace 'example-workspace-2'
121+
$ porchctl rpkg copy example-repo.example-package-name.example-workspace --workspace=example-workspace-2 --namespace=example-namespace
125122
`
126123

127124
var DelShort = `Delete a package revision.`
128125
var DelLong = `
129-
porchctl rpkg del PACKAGE_REV_NAME... [flags]
126+
porchctl rpkg del K8S_PACKAGE_REV_NAME... [flags]
130127
131128
Args:
132129
133-
PACKAGE_REV_NAME...:
134-
The name of one or more package revisions. If more than
130+
K8S_PACKAGE_REV_NAME...:
131+
The kubernetes name of one or more package revisions. If more than
135132
one is provided, they must be space-separated.
136133
`
137134
var DelExamples = `
138-
# remove package revision blueprint-e982b2196b35a4f5e81e92f49a430fe463aa9f1a from the default namespace
139-
$ porchctl rpkg del blueprint-e982b2196b35a4f5e81e92f49a430fe463aa9f1a --namespace=default
135+
# remove package revision 'example-repo.example-package-name.example-workspace'
136+
$ porchctl rpkg del example-repo.example-package-name.example-workspace -n example-namespace
140137
`
141138

142139
var GetShort = `List package revisions in registered repositories.`
143140
var GetLong = `
144-
porchctl rpkg get [PACKAGE_REV_NAME] [flags]
141+
porchctl rpkg get [K8S_PACKAGE_REV_NAME] [flags]
145142
146143
Args:
147144
148-
PACKAGE_REV_NAME:
149-
The name of a package revision. If provided, only that specific
145+
K8S_PACKAGE_REV_NAME:
146+
The kubernetes name of a package revision. If provided, only that specific
150147
package revision will be shown. Defaults to showing all package
151148
revisions from all repositories.
152149
@@ -161,17 +158,20 @@ Flags:
161158
matches this value will be included in the results.
162159
`
163160
var GetExamples = `
164-
# get a specific package revision in the default namespace
165-
$ porchctl rpkg get blueprint-e982b2196b35a4f5e81e92f49a430fe463aa9f1a --namespace=default
161+
# get a specific package revision using its kubernetes resource name in the 'example-namespace' namespace
162+
$ porchctl rpkg get example-repo.example-package-name.example-workspace --namespace=example-namespace
163+
164+
# get a specific package revision named 'example-package-name' in the 'example-namespace' namespace
165+
$ porchctl rpkg get --name=example-package-name --namespace=example-namespace
166166
167-
# get all package revisions in the bar namespace
168-
$ porchctl rpkg get --namespace=bar
167+
# get all package revisions in the 'example-namespace' namespace
168+
$ porchctl rpkg get --namespace=example-namespace
169169
170-
# get all package revisions with revision v0
171-
$ porchctl rpkg get --revision=v0
170+
# get all package revisions with revision '0'
171+
$ porchctl rpkg get --revision=0
172172
`
173173

174-
var InitShort = `Initializes a new package in a repository.`
174+
var InitShort = `Initializes a new package revision in a repository.`
175175
var InitLong = `
176176
porchctl rpkg init PACKAGE_NAME [flags]
177177
@@ -198,93 +198,93 @@ Flags:
198198
Link to page with information about the package
199199
`
200200
var InitExamples = `
201-
# create a new package named foo in the repository blueprint.
202-
$ porchctl rpkg init foo --namespace=default --repository=blueprint --workspace=v1
201+
# create a new package named 'example-package-name' in the repository 'example-repository' which exists in the namespace 'example-namespace'.
202+
$ porchctl rpkg init example-package-name --repository=example-repository --workspace=example-workspace --namespace=example-namespace
203203
`
204204

205205
var ProposeShort = `Propose that a package revision should be published.`
206206
var ProposeLong = `
207-
porchctl rpkg propose [PACKAGE_REV_NAME...] [flags]
207+
porchctl rpkg propose [K8S_PACKAGE_REV_NAME...] [flags]
208208
209209
Args:
210210
211-
PACKAGE_REV_NAME...:
212-
The name of one or more package revisions. If more than
211+
K8S_PACKAGE_REV_NAME...:
212+
The kubernetes name of one or more package revisions. If more than
213213
one is provided, they must be space-separated.
214214
`
215215
var ProposeExamples = `
216-
# propose that package revision blueprint-91817620282c133138177d16c981cf35f0083cad should be finalized.
217-
$ porchctl rpkg propose blueprint-91817620282c133138177d16c981cf35f0083cad --namespace=default
216+
# propose that package revision 'example-repo.example-package-name.example-workspace' should be finalized.
217+
$ porchctl rpkg propose example-repo.example-package-name.example-workspace --namespace=example-namespace
218218
`
219219

220220
var ProposeDeleteShort = `Propose deletion of a published package revision.`
221221
var ProposeDeleteLong = `
222-
porchctl rpkg propose-delete PACKAGE_REV_NAME... [flags]
222+
porchctl rpkg propose-delete K8S_PACKAGE_REV_NAME... [flags]
223223
224224
Args:
225225
226-
PACKAGE_REV_NAME...:
227-
The name of one or more package revisions. If more than
226+
K8S_PACKAGE_REV_NAME...:
227+
The kubernetes name of one or more package revisions. If more than
228228
one is provided, they must be space-separated.
229229
`
230230
var ProposeDeleteExamples = `
231-
# Propose published package revision blueprint-e982b2196b35a4f5e81e92f49a430fe463aa9f1a for deletion.
232-
$ porchctl rpkg propose-delete blueprint-e982b2196b35a4f5e81e92f49a430fe463aa9f1a --namespace=default
231+
# Propose published package revision 'example-repo.example-package-name.example-workspace' for deletion.
232+
$ porchctl rpkg propose-delete example-repo.example-package-name.example-workspace --namespace=example-namespace
233233
`
234234

235235
var PullShort = `Pull the content of the package revision.`
236236
var PullLong = `
237-
porchctl rpkg pull PACKAGE_REV_NAME [DIR] [flags]
237+
porchctl rpkg pull K8S_PACKAGE_REV_NAME [DIR] [flags]
238238
239239
Args:
240240
241-
PACKAGE_REV_NAME:
242-
The name of a an existing package revision in a repository.
241+
K8S_PACKAGE_REV_NAME:
242+
The kubernetes name of a an existing package revision in a repository.
243243
244244
DIR:
245245
A local directory where the package manifests will be written.
246246
If not provided, the manifests are written to stdout.
247247
`
248248
var PullExamples = `
249-
# pull the content of package revision blueprint-d5b944d27035efba53836562726fb96e51758d97
250-
$ porchctl rpkg pull blueprint-d5b944d27035efba53836562726fb96e51758d97 --namespace=default
249+
# pull the content of package revision 'example-repo.example-package-name.example-workspace'
250+
$ porchctl rpkg pull example-repo.example-package-name.example-workspace --namespace=example-namespace
251251
`
252252

253253
var PushShort = `Push resources to a package revision.`
254254
var PushLong = `
255-
porchctl rpkg push PACKAGE_REV_NAME [DIR] [flags]
255+
porchctl rpkg push K8S_PACKAGE_REV_NAME [DIR] [flags]
256256
257257
Args:
258258
259-
PACKAGE_REV_NAME:
260-
The name of a an existing package revision in a repository.
259+
K8S_PACKAGE_REV_NAME:
260+
The kubernetes name of a an existing package revision in a repository.
261261
262262
DIR:
263263
A local directory with the new manifest. If the manifests have be read from stdin, use '-' in place of DIR.
264264
`
265265
var PushExamples = `
266-
# update the package revision blueprint-f977350dff904fa677100b087a5bd989106d0456 with the resources
267-
# in the ./package directory
268-
$ porchctl rpkg push blueprint-f977350dff904fa677100b087a5bd989106d0456 ./package --namespace=default
266+
# update the package revision 'example-repo.example-package-name.example-workspace' with the resources
267+
# in the './example-package-dir' directory
268+
$ porchctl rpkg push example-repo.example-package-name.example-workspace ./example-package-dir --namespace=example-namespace
269269
270-
# update the package revision blueprint-f977350dff904fa677100b087a5bd989106d0456 with the resources
271-
# using stdin
272-
$ porchctl rpkg push blueprint-f977350dff904fa677100b087a5bd989106d0456 - <stdin> --namespace=default
270+
# update the package revision 'example-repo.example-package-name.example-workspace' with the resources
271+
# using 'stdin'
272+
$ porchctl rpkg push example-repo.example-package-name.example-workspace - <stdin> --namespace=example-namespace
273273
`
274274

275275
var RejectShort = `Reject a proposal to publish or delete a package revision.`
276276
var RejectLong = `
277-
porchctl rpkg reject [PACKAGE_REV_NAME...] [flags]
277+
porchctl rpkg reject [K8S_PACKAGE_REV_NAME...] [flags]
278278
279279
Args:
280280
281-
PACKAGE_REV_NAME...:
282-
The name of one or more package revisions. If more than
281+
K8S_PACKAGE_REV_NAME...:
282+
The kubernetes name of one or more package revisions. If more than
283283
one is provided, they must be space-separated.
284284
`
285285
var RejectExamples = `
286-
# reject the proposal for package revision blueprint-8f9a0c7bf29eb2cbac9476319cd1ad2e897be4f9
287-
$ porchctl rpkg reject blueprint-8f9a0c7bf29eb2cbac9476319cd1ad2e897be4f9 --namespace=default
286+
# reject the proposal for package revision 'example-repo.example-package-name.example-workspace'
287+
$ porchctl rpkg reject example-repo.example-package-name.example-workspace --namespace=example-namespace
288288
`
289289

290290
var UpgradeShort = `Create a new revision which upgrades a published downstream to a more recent published revision of its upstream package.`
@@ -331,3 +331,4 @@ var UpgradeExamples = `
331331
# upgrade deployment.some-package.v1 package to v3 of its upstream, using copy-merge strategy
332332
$ porchctl rpkg upgrade deployment.some-package.v1 --revision=3 --workspace=v2 --strategy=copy-merge
333333
`
334+

0 commit comments

Comments
 (0)