Skip to content

Commit

Permalink
Change wording for dev/deploy (#6408)
Browse files Browse the repository at this point in the history
* Change wording for dev/deploy

* Update doc

* Fix help tests

* Update deploy help message
  • Loading branch information
feloy authored Jan 9, 2023
1 parent f39c5b6 commit 06b95fc
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions cmd/odo/help_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Examples:

mainCommands = `Main Commands:
build-images Build images
deploy Deploy components
dev Deploy component to development cluster
deploy Run your application on the cluster in the Deploy mode
dev Run your application on the cluster in the Dev mode
init Init bootstraps a new project
logs Show logs of all containers of the component
registry List all components from the Devfile registry
Expand Down
6 changes: 3 additions & 3 deletions docs/website/docs/command-reference/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $ odo dev
/ \__/ odo version: v3.0.0-alpha1
\__/

Deploying to the cluster in developer mode
Running on the cluster in Dev mode
✓ Waiting for Kubernetes resources [3s]
✓ Syncing files into the container [335ms]
✓ Building your application in container on cluster [2s]
Expand Down Expand Up @@ -113,7 +113,7 @@ $ odo dev --build-command my-build-with-version
/ \__/ odo version: v3.0.0-alpha3
\__/
Deploying to the cluster in developer mode
Running on the cluster in Dev mode
✓ Waiting for Kubernetes resources [39s]
✓ Syncing files into the container [84ms]
✓ Building your application in container on cluster (command: my-build-with-version) [456ms]
Expand Down Expand Up @@ -175,7 +175,7 @@ $ odo dev --run-command my-run-with-postgres
/ \__/ odo version: v3.0.0-alpha3
\__/
Deploying to the cluster in developer mode
Running on the cluster in Dev mode
✓ Added storage m2 to my-java-springboot-app
✓ Creating kind ServiceBinding [8ms]
✓ Waiting for Kubernetes resources [39s]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $ odo dev
/ \__/ odo version: v3.0.0-rc1
\__/

Deploying to the cluster in developer mode
Running on the cluster in Dev mode
• Waiting for Kubernetes resources ...
⚠ Pod is Pending
✓ Pod is Running
Expand Down Expand Up @@ -191,7 +191,7 @@ $ odo dev
/ \__/ odo version: v3.0.0-rc1
\__/

Deploying to the cluster in developer mode
Running on the cluster in Dev mode
• Waiting for Kubernetes resources ...
⚠ Pod is Pending
✓ Pod is Running
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $ odo dev
/ \__/ odo version: v3.5.0
\__/

Deploying to the cluster in developer mode
Running on the cluster in Dev mode
• Waiting for Kubernetes resources ...
⚠ Pod is Pending
✓ Pod is Running
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $ odo dev
/ \__/ odo version: v3.5.0
\__/

Deploying to the cluster in developer mode
Running on the cluster in Dev mode
• Waiting for Kubernetes resources ...
⚠ Pod is Pending
✓ Pod is Running
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $ odo dev
/ \__/ odo version: v3.5.0
\__/

Deploying to the cluster in developer mode
Running on the cluster in Dev mode
• Waiting for Kubernetes resources ...
✓ Added storage m2 to component
⚠ Pod is Pending
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $ odo dev
/ \__/ odo version: v3.5.0
\__/

Deploying to the cluster in developer mode
Running on the cluster in Dev mode
• Waiting for Kubernetes resources ...
⚠ Pod is Pending
✓ Pod is Running
Expand Down
8 changes: 4 additions & 4 deletions pkg/odo/cli/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type DeployOptions struct {
var _ genericclioptions.Runnable = (*DeployOptions)(nil)

var deployExample = templates.Examples(`
# Deploy components defined in the devfile
# Run the components defined in the Devfile on the cluster in the Deploy mode
%[1]s
`)

Expand Down Expand Up @@ -77,7 +77,7 @@ func (o *DeployOptions) Run(ctx context.Context) error {
scontext.SetProjectType(ctx, devfileObj.Data.GetMetadata().ProjectType)
scontext.SetDevfileName(ctx, devfileName)
// Output what the command is doing / information
log.Title("Deploying the application using "+devfileName+" Devfile",
log.Title("Running the application in Deploy mode using "+devfileName+" Devfile",
"Namespace: "+namespace,
"odo version: "+version.VERSION)

Expand All @@ -96,8 +96,8 @@ func NewCmdDeploy(name, fullName string) *cobra.Command {
o := NewDeployOptions()
deployCmd := &cobra.Command{
Use: name,
Short: "Deploy components",
Long: "Deploy the components defined in the devfile",
Short: "Run your application on the cluster in the Deploy mode",
Long: "Run the components defined in the Devfile on the cluster in the Deploy mode",
Example: fmt.Sprintf(deployExample, fullName),
Args: cobra.MaximumNArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
10 changes: 5 additions & 5 deletions pkg/odo/cli/dev/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ func NewDevOptions() *DevOptions {
}

var devExample = ktemplates.Examples(`
# Deploy component to the development cluster, using the default run command
# Run your application on the cluster in the Dev mode, using the default run command
%[1]s
# Deploy component to the development cluster, using the specified run command
# Run your application on the cluster in the Dev mode, using the specified run command
%[1]s --run-command <my-command>
# Deploy component to the development cluster without automatically syncing the code upon any file changes
# Run your application on the cluster in the Dev mode, without automatically syncing the code upon any file changes
%[1]s --no-watch
`)

Expand Down Expand Up @@ -170,7 +170,7 @@ func (o *DevOptions) Run(ctx context.Context) (err error) {
scontext.SetProjectType(ctx, devFileObj.Data.GetMetadata().ProjectType)
scontext.SetDevfileName(ctx, componentName)

log.Sectionf("Deploying to %s in developer mode", deployingTo)
log.Sectionf("Running on %s in Dev mode", deployingTo)

return o.clientset.DevClient.Start(
o.ctx,
Expand Down Expand Up @@ -207,7 +207,7 @@ func NewCmdDev(name, fullName string) *cobra.Command {
o := NewDevOptions()
devCmd := &cobra.Command{
Use: name,
Short: "Deploy component to development cluster",
Short: "Run your application on the cluster in the Dev mode",
Long: `odo dev is a long running command that will automatically sync your source to the cluster.
It forwards endpoints with any exposure values ('public', 'internal' or 'none') to a port on localhost.`,
Example: fmt.Sprintf(devExample, fullName),
Expand Down

0 comments on commit 06b95fc

Please sign in to comment.