Skip to content

Add support for subcommands in CLI #429

@oleg-nenashev

Description

@oleg-nenashev

Jenkinsfile Runner includes more options and behaviors, and it is difficult to maintain it with a single-level CLI interface. I suggest introducing sub-commands so that we can easily evolve CLI and isolate commands so that it is easier to use and maintain JFR. Examples of commands:

  • jenkinsfile-runner [run] [args...] for common mode
  • jenkinsfile-runner cli [args...] for CLI
  • jenkinsfile-runner manage-plugins [args...] for the plugin manager
  • jenkinsfile-runner help for the top-level help
  • jenkinsfile-runner version for the version info

Acceptance criteria:

  • There is a two-level CLI implemented. It might require switching from args4j to another lib
  • It is possible to add new commands to the bootstrap
  • Nice2have: It is possible to add more sub-commands from classpath (e.g. via declaring a system property or an annotation)

P.S: This is a spin-off of the conversation with @literalplus in #213 : #213 (comment)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions