jenkins-x / jx

Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
https://jenkins-x.io/
Apache License 2.0
4.57k stars 787 forks source link

Properly Align Help Descriptions #7520

Closed danielhelfand closed 3 years ago

danielhelfand commented 4 years ago

Summary

Running jx help results in the following output:

Installing:
  profile          Set your jx profile
  boot             Boots up Jenkins X in a Kubernetes cluster using GitOps and a Jenkins X Pipeline
  install          Install Jenkins X in the current Kubernetes cluster
  uninstall        Uninstall the Jenkins X platform
  upgrade          Upgrades a resource
  create cluster   Create a new Kubernetes cluster
  create jenkins token Adds a new username and API token for a Jenkins server
  delete jenkins token Deletes one or more Jenkins user API tokens
  init             Init Jenkins X

Adding Projects to Jenkins X:
  import           Imports a local project or Git repository into Jenkins
  create spring    Create a new Spring Boot application and import the generated code into Git and Jenkins for CI/CD
  create quickstart Create a new app from a Quickstart and import the generated code into Git and Jenkins for CI/CD
  create quickstartlocation Create a location of quickstarts for your team

Apps:
  create addon     Creates an addon
  create token addon Adds a new token/login for a user for a given addon
  delete addon     Deletes one or more addons
  delete token addon Deletes one or more API tokens for a user on an issue addon server
  delete app       Deletes one or more apps from Jenkins X (an app is similar to an addon)
  delete application Deletes one or more applications from Jenkins
  add app          Adds an App (an app is similar to an addon)

Git:
  create git server Creates a new Git server from a URL and kind
  delete git server Deletes one or more Git servers
  create git token Adds a new API token for a user on a Git server
  delete git token Deletes one or more API tokens for a user on a Git server
  repository       Opens the web page for the current Git repository in a browser

Working with Kubernetes:
  compliance       Run compliance tests against Kubernetes cluster
  completion       Output shell completion code for the given shell (bash or zsh)
  context          View or change the current Kubernetes context (Kubernetes cluster)
  environment      View or change the current environment in the current Kubernetes cluster
  team             View or change the current team in the current Kubernetes cluster
  namespace        View or change the current namespace context in the current Kubernetes cluster
  prompt           Generate the command line prompt for the current team and environment
  scan             Perform a scan action
  shell            Create a sub shell so that changes to the Kubernetes context, namespace or environment remain local to the shell
  status           status of the Kubernetes cluster or named node

Working with Applications:
  logs             Tails the log of the latest pod for a deployment
  open             Open a service in a browser
  rsh              Opens a terminal in a pod or runs a command in the pod
  sync             Synchronises your local files to a DevPod

Working with Environments:
  preview          Creates or updates a Preview Environment for the current version of an application
  promote          Promotes a version of an application to an Environment
  create addon environment Create an Environment Controller to handle webhooks and promote changes from GitOps
  create environment Create a new Environment which is used to promote your Team's Applications via Continuous Delivery
  delete addon environment Deletes the Environment Controller 
  delete environment Deletes one or more Environments
  edit environment Edits an Environment which is used to promote your Team's Applications via Continuous Delivery
  get environments Display one or more Environments

Working with Jenkins X resources:
  get              Display one or more resources
  edit             Edit a resource
  create           Create a new resource
  update           Updates an existing resource
  delete           Deletes one or more resources
  add              Adds a new resource
  start            Starts a process such as a pipeline
  stop             Stops a process such as a pipeline

Jenkins X Pipeline Commands:
  step             pipeline steps

Jenkins X services:
  controller       Runs a controller
  gc               Garbage collects Jenkins X resources

Working with Jenkins X UI:
  ui               Opens the CloudBees Jenkins X UI app for Kubernetes for visualising CI/CD and your environments

Other Commands:
  diagnose         Print diagnostic information about the Jenkins X installation
  docs             Open the documentation in a browser
  help             Help about any command
  version          Print the version information

Options:
  -b, --batch-mode=false: Runs in batch mode without prompting for user input
      --verbose=false: Enables verbose output. The environment variable JX_LOG_LEVEL has precedence over this flag and allows setting the logging level to any value of: panic, fatal, error, warn, info, debug, trace
  -v, --version=false: version for jx
Usage:
  jx [flags] [options]
Use "jx <command> --help" for more information about a given command.
Use "jx options" for a list of global command-line options (applies to all commands).

For some of the commands (e.g. create jenkins token), the command length is long and throws off the alignment of the descriptions. To improve readability, it would help to align descriptions of each section, such as below:

Installing:
  profile                          Set your jx profile
  boot                             Boots up Jenkins X in a Kubernetes cluster using GitOps and a Jenkins X Pipeline
  install                          Install Jenkins X in the current Kubernetes cluster
  uninstall                        Uninstall the Jenkins X platform
  upgrade                          Upgrades a resource
  create cluster                   Create a new Kubernetes cluster
  create jenkins token             Adds a new username and API token for a Jenkins server
  delete jenkins token             Deletes one or more Jenkins user API tokens
  init                             Init Jenkins X

Steps to reproduce the behavior

Run jx help.

Expected behavior

Proper alignment of command descriptions.

Actual behavior

See above.

Jx version

The output of jx version is:

Version        2.1.127
Commit         4bc05a9
Build date     2020-08-05T20:34:57Z
Go version     1.13.8
Git tree state clean

Diagnostic information

N/A

Kubernetes cluster

N/A

Kubectl version

N/A

Operating system / Environment

N/A

jenkins-x-bot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://jenkins-x.io/community. /lifecycle stale

jenkins-x-bot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close. Provide feedback via https://jenkins-x.io/community. /lifecycle rotten

jenkins-x-bot commented 3 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten. Provide feedback via https://jenkins-x.io/community. /close

jenkins-x-bot commented 3 years ago

@jenkins-x-bot: Closing this issue.

In response to [this](https://github.com/jenkins-x/jx/issues/7520#issuecomment-757327667): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. >Provide feedback via https://jenkins-x.io/community. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [jenkins-x/lighthouse](https://github.com/jenkins-x/lighthouse/issues/new?title=Command%20issue:) repository.