Skip to content

fix: some commands do not need the -f parameter #559 #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 24, 2022

Conversation

himku
Copy link

@himku himku commented May 23, 2022

Signed-off-by: sjie

Summary

Delete some global parameters. Some subcommands no longer have global parameters that should not appear

Description

  • Fix global parameters displayed on subcommands

Related Issues

New Behavior (screenshots if needed)

image

image

@daniel-hutao daniel-hutao self-requested a review May 23, 2022 14:26
@daniel-hutao daniel-hutao self-assigned this May 23, 2022
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
@daniel-hutao
Copy link
Member

@himku Thanks for the proposal! The overall finish is good, there are some small details may not noticed, I added a commit, you can see 11ed764 for more info.


Finally I did some tests, but because the changes have a large impact, it is likely that there are still oversights, I hope that others help to test more @devstream-io/devstream, if you find problems, we promptly fix them together.


dtm -h

DevStream is an open-source DevOps toolchain manager

######                 #####                                    
#     # ###### #    # #     # ##### #####  ######   ##   #    # 
#     # #      #    # #         #   #    # #       #  #  ##  ## 
#     # #####  #    #  #####    #   #    # #####  #    # # ## # 
#     # #      #    #       #   #   #####  #      ###### #    # 
#     # #       #  #  #     #   #   #   #  #      #    # #    # 
######  ######   ##    #####    #   #    # ###### #    # #    #

Usage:
  dtm [command]

Available Commands:
  apply       Create or update DevOps tools according to DevStream configuration file
  completion  Generate the autocompletion script for the specified shell
  delete      Delete DevOps tools according to DevStream configuration file
  destroy     Destroy DevOps tools deployment according to DevStream configuration file & state file
  develop     Develop is used for develop a new plugin
  help        Help about any command
  init        Download needed plugins according to the config file
  list        This command only supports listing plugins now.
  show        Show is used to print some useful information
  verify      Verify DevOps tools according to DevStream config file and state
  version     Print the version number of DevStream

Flags:
      --debug   debug level log
  -h, --help    help for dtm

Use "dtm [command] --help" for more information about a command.

apply -h

Create or update DevOps tools according to DevStream configuration file. 
DevStream will generate and execute a new plan based on the config file and the state file by default.

Usage:
  dtm apply [flags]

Flags:
  -f, --config-file string   config file (default "config.yaml")
  -h, --help                 help for apply
  -d, --plugin-dir string    plugins directory (default ".devstream")
  -y, --yes                  apply directly without confirmation

Global Flags:
      --debug   debug level log

delete -h

Delete DevOps tools according to DevStream configuration file. 
DevStream will delete everything defined in the config file, regardless of the state.

Usage:
  dtm delete [flags]

Flags:
  -f, --config-file string   config file (default "config.yaml")
      --force                force delete by config
  -h, --help                 help for delete
  -d, --plugin-dir string    plugins directory (default ".devstream")
  -y, --yes                  delete directly without confirmation

Global Flags:
      --debug   debug level log

destroy -h

Destroy DevOps tools deployment according to DevStream configuration file & state file.

Usage:
  dtm destroy [flags]

Flags:
  -f, --config-file string   config file (default "config.yaml")
  -h, --help                 help for destroy
  -y, --yes                  destroy directly without confirmation

Global Flags:
      --debug   debug level log

develop -h

Develop is used for develop a new plugin

Usage:
  dtm develop [command]

Available Commands:
  create-plugin   Create a new plugin
  validate-plugin Validate a plugin

Flags:
  -h, --help   help for develop

Global Flags:
      --debug   debug level log

Use "dtm develop [command] --help" for more information about a command.

create-plugin -h

Create-plugin is used for creating a new plugin.
Exampls:
  dtm develop create-plugin --name=YOUR-PLUGIN-NAME

Usage:
  dtm develop create-plugin [flags]

Flags:
  -h, --help          help for create-plugin
  -n, --name string   specify name with the new plugin

Global Flags:
      --debug   debug level log

validate-plugin -h

Validate-plugin is used for validating an existing plugin or all plugins.
Examples:
  dtm develop validate-plugin --name=YOUR-PLUGIN-NAME,
  dtm develop validate-plugin --all

Usage:
  dtm develop validate-plugin [flags]

Flags:
  -a, --all           validate all plugins
  -h, --help          help for validate-plugin
  -n, --name string   specify name with the new plugin

Global Flags:
      --debug   debug level log

init -h

Download needed plugins according to the config file

Usage:
  dtm init [flags]

Flags:
  -f, --config-file string   config file (default "config.yaml")
  -h, --help                 help for init
  -d, --plugin-dir string    plugins directory (default ".devstream")

Global Flags:
      --debug   debug level log

list -h

This command only supports listing plugins now.

Usage:
  dtm list [command]

Available Commands:
  plugins     List all plugins

Flags:
  -h, --help   help for list

Global Flags:
      --debug   debug level log

Use "dtm list [command] --help" for more information about a command.

list plugins -h

This command lists all of the plugins.
Examples:
  dtm list plugins

Usage:
  dtm list plugins [flags]

Flags:
  -r, --filter string   filter plugin by regex
  -h, --help            help for plugins

Global Flags:
      --debug   debug level log

show -h

Show is used to print some useful information

Usage:
  dtm show [command]

Available Commands:
  config      Show configuration information
  status      Show status information

Flags:
  -h, --help   help for show

Global Flags:
      --debug   debug level log

Use "dtm show [command] --help" for more information about a command.

show config -h

Show config is used for showing plugins' template configuration information.
Examples:
  dtm show config --plugin=A-PLUGIN-NAME

Usage:
  dtm show config [flags]

Flags:
  -h, --help            help for config
  -p, --plugin string   specify name with the plugin

Global Flags:
      --debug   debug level log

show status -h

Show status is used for showing plugins' status information.
Examples:
  dtm show status --plugin=A-PLUGIN-NAME --id=A-PLUGIN-INSTANCE-ID
  dtm show status -p=A-PLUGIN-NAME -i=INSTANCE-ID
  dtm show status --all
  dtm show status -a

Usage:
  dtm show status [flags]

Flags:
  -a, --all                  show all instances of all plugins status
  -f, --config-file string   config file (default "config.yaml")
  -h, --help                 help for status
  -i, --id string            specify id with the plugin instance
  -p, --plugin string        specify name with the plugin
  -d, --plugin-dir string    plugins directory (default ".devstream")

Global Flags:
      --debug   debug level log

verify -h

Verify DevOps tools according to DevStream config file and state.

Usage:
  dtm verify [flags]

Flags:
  -f, --config-file string   config file (default "config.yaml")
  -h, --help                 help for verify
  -d, --plugin-dir string    plugins directory (default ".devstream")

Global Flags:
      --debug   debug level log

@daniel-hutao daniel-hutao merged commit 2c42ccd into devstream-io:main May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants