66import click
77import yaml
88
9+ from cdevents .cli .artifact import packaged , published
10+ from cdevents .cli .branch import created as branch_created
11+ from cdevents .cli .branch import deleted as branch_deleted
12+ from cdevents .cli .build import finished , queued , started
913from cdevents .cli .constants import LOGGING_CONFIGURATION_FILE
14+ from cdevents .cli .env import created as env_created
15+ from cdevents .cli .env import deleted as env_deleted
16+ from cdevents .cli .env import modified as env_modified
17+ from cdevents .cli .pipelinerun import finished as pipe_finished
18+ from cdevents .cli .pipelinerun import queued as pipe_queued
19+ from cdevents .cli .pipelinerun import started as pipe_started
20+ from cdevents .cli .service import deployed as service_deployed
21+ from cdevents .cli .service import removed as service_removed
22+ from cdevents .cli .service import rolledback as service_rolledback
23+ from cdevents .cli .service import upgraded as service_upgraded
24+ from cdevents .cli .taskrun import finished as taskrun_finished
25+ from cdevents .cli .taskrun import started as taskrun_started
1026from cdevents .cli .utils import add_disclaimer_text
1127
12- from cdevents .cli .build import finished , queued , started
13- from cdevents .cli .artifact import packaged , published
14- from cdevents .cli .branch import created as branch_created , deleted as branch_deleted
15- from cdevents .cli .env import created as env_created , deleted as env_deleted , modified as env_modified
16- from cdevents .cli .pipelinerun import started as pipe_started , finished as pipe_finished , queued as pipe_queued
17- from cdevents .cli .service import deployed as service_deployed , upgraded as service_upgraded , removed as service_removed , rolledback as service_rolledback
18- from cdevents .cli .taskrun import started as taskrun_started , finished as taskrun_finished
19-
2028
2129def configure_logging ():
2230 """Configures logging from file."""
@@ -29,6 +37,7 @@ def configure_logging():
2937def build ():
3038 """Click group for command 'build'."""
3139
40+
3241build .add_command (finished )
3342build .add_command (queued )
3443build .add_command (started )
@@ -38,6 +47,7 @@ def build():
3847def artifact ():
3948 """Click group for command 'artifact'."""
4049
50+
4151artifact .add_command (packaged )
4252artifact .add_command (published )
4353
@@ -46,6 +56,7 @@ def artifact():
4656def branch ():
4757 """Click group for command 'branch'."""
4858
59+
4960branch .add_command (branch_created )
5061branch .add_command (branch_deleted )
5162
@@ -54,27 +65,27 @@ def branch():
5465def env ():
5566 """Click group for command 'environment'."""
5667
68+
5769env .add_command (env_created )
5870env .add_command (env_deleted )
5971env .add_command (env_modified )
6072
6173
62-
63-
6474@click .group (help = add_disclaimer_text ("""Commands PipelineRun related CloudEvent.""" ))
6575def pipelinerun ():
6676 """Click group for command 'environment'."""
6777
78+
6879pipelinerun .add_command (pipe_started )
6980pipelinerun .add_command (pipe_finished )
7081pipelinerun .add_command (pipe_queued )
7182
7283
73-
7484@click .group (help = add_disclaimer_text ("""Commands Service related CloudEvent.""" ))
7585def service ():
7686 """Click group for command 'service'."""
7787
88+
7889service .add_command (service_deployed )
7990service .add_command (service_upgraded )
8091service .add_command (service_removed )
@@ -85,12 +96,11 @@ def service():
8596def taskrun ():
8697 """Click group for command 'taskrun'."""
8798
99+
88100taskrun .add_command (taskrun_started )
89101taskrun .add_command (taskrun_finished )
90102
91103
92-
93-
94104@click .group (
95105 help = add_disclaimer_text (
96106 """Main entry point for cdevents client cli.
0 commit comments