Skip to content

[JENKINS-75378] Add listener to CLI command execution #16673

Open

Description

@jenkins-infra-bot

Introduce a new ExtensionPoint that allows plugins or external components to subscribe to CLI execution events on the server. This would enable plugins to react to CLI commands in real-time.

 

Benefits:

  • Provides a way to monitor CLI command executions for auditing or debugging
  • Allows external plugins to react to CLI operations
  • Improves extensibility and observability

Proposed Implementation:

  • Introduce a new CliListener ExtensionPoint
  • Fire events before and after CLI command execution
  • Provide relevant metadata, such as user, command name, and execution status

Possible Use Cases:

  • Enforcing custom access policies
  • Implementing custom logging or metrics  for CLI usage

Originally reported by apuig, imported from: Add listener to CLI command execution
  • assignee: apuig
  • status: In Review
  • priority: Minor
  • component(s): core
  • label(s): cli, extension
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-11-24
Raw content of original issue

Introduce a new ExtensionPoint that allows plugins or external components to subscribe to CLI execution events on the server. This would enable plugins to react to CLI commands in real-time.

 

Benefits:

  • Provides a way to monitor CLI command executions for auditing or debugging
  • Allows external plugins to react to CLI operations
  • Improves extensibility and observability

Proposed Implementation:

  • Introduce a new CliListener ExtensionPoint
  • Fire events before and after CLI command execution
  • Provide relevant metadata, such as user, command name, and execution status

Possible Use Cases:

  • Enforcing custom access policies
  • Implementing custom logging or metrics  for CLI usage

Activity

  1. jenkins-infra-bot commented on Mar 6, 2025

    @jenkins-infra-bot
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions