@@ -2,24 +2,32 @@ package clicommand
22
33import "github.com/urfave/cli"
44
5+ const (
6+ categoryJobCommands = "Commands that can be run within a Buildkite job"
7+ categoryInternal = "Internal commands, not intended to be run by users"
8+ )
9+
510var BuildkiteAgentCommands = []cli.Command {
611 // These commands are special. The have a different lifecycle to the others
712 AgentStartCommand ,
813 BootstrapCommand ,
14+ KubernetesBootstrapCommand ,
915
1016 // These are in alphabetical order
1117 AcknowledgementsCommand ,
1218 AnnotateCommand ,
1319 {
14- Name : "annotation" ,
15- Usage : "Make changes to an annotation on the currently running build" ,
20+ Name : "annotation" ,
21+ Category : categoryJobCommands ,
22+ Usage : "Make changes to annotations on the currently running build" ,
1623 Subcommands : []cli.Command {
1724 AnnotationRemoveCommand ,
1825 },
1926 },
2027 {
21- Name : "artifact" ,
22- Usage : "Upload/download artifacts from Buildkite jobs" ,
28+ Name : "artifact" ,
29+ Category : categoryJobCommands ,
30+ Usage : "Upload/download artifacts from Buildkite jobs" ,
2331 Subcommands : []cli.Command {
2432 ArtifactUploadCommand ,
2533 ArtifactDownloadCommand ,
@@ -28,15 +36,17 @@ var BuildkiteAgentCommands = []cli.Command{
2836 },
2937 },
3038 {
31- Name : "build" ,
32- Usage : "Interact with a Buildkite build" ,
39+ Name : "build" ,
40+ Category : categoryJobCommands ,
41+ Usage : "Interact with a Buildkite build" ,
3342 Subcommands : []cli.Command {
3443 BuildCancelCommand ,
3544 },
3645 },
3746 {
38- Name : "env" ,
39- Usage : "Process environment subcommands" ,
47+ Name : "env" ,
48+ Category : categoryJobCommands ,
49+ Usage : "Interact with the environment of the currently running build" ,
4050 Subcommands : []cli.Command {
4151 EnvDumpCommand ,
4252 EnvGetCommand ,
@@ -45,10 +55,10 @@ var BuildkiteAgentCommands = []cli.Command{
4555 },
4656 },
4757 GitCredentialsHelperCommand ,
48- KubernetesBootstrapCommand ,
4958 {
50- Name : "lock" ,
51- Usage : "Process lock subcommands" ,
59+ Name : "lock" ,
60+ Category : categoryJobCommands ,
61+ Usage : "Lock or unlock resources for the currently running build" ,
5262 Subcommands : []cli.Command {
5363 LockAcquireCommand ,
5464 LockDoCommand ,
@@ -58,15 +68,17 @@ var BuildkiteAgentCommands = []cli.Command{
5868 },
5969 },
6070 {
61- Name : "redactor" ,
62- Usage : "Redact sensitive information from logs" ,
71+ Name : "redactor" ,
72+ Category : categoryJobCommands ,
73+ Usage : "Redact sensitive information from logs" ,
6374 Subcommands : []cli.Command {
6475 RedactorAddCommand ,
6576 },
6677 },
6778 {
68- Name : "meta-data" ,
69- Usage : "Get/set data from Buildkite jobs" ,
79+ Name : "meta-data" ,
80+ Category : categoryJobCommands ,
81+ Usage : "Get/set metadata from Buildkite jobs" ,
7082 Subcommands : []cli.Command {
7183 MetaDataSetCommand ,
7284 MetaDataGetCommand ,
@@ -75,31 +87,35 @@ var BuildkiteAgentCommands = []cli.Command{
7587 },
7688 },
7789 {
78- Name : "oidc" ,
79- Usage : "Interact with Buildkite OpenID Connect (OIDC)" ,
90+ Name : "oidc" ,
91+ Category : categoryJobCommands ,
92+ Usage : "Interact with Buildkite OpenID Connect (OIDC)" ,
8093 Subcommands : []cli.Command {
8194 OIDCRequestTokenCommand ,
8295 },
8396 },
8497 AgentPauseCommand ,
8598 {
86- Name : "pipeline" ,
87- Usage : "Make changes to the pipeline of the currently running build" ,
99+ Name : "pipeline" ,
100+ Category : categoryJobCommands ,
101+ Usage : "Make changes to the pipeline of the currently running build" ,
88102 Subcommands : []cli.Command {
89103 PipelineUploadCommand ,
90104 },
91105 },
92106 AgentResumeCommand ,
93107 {
94- Name : "secret" ,
95- Usage : "Interact with Pipelines Secrets" ,
108+ Name : "secret" ,
109+ Category : categoryJobCommands ,
110+ Usage : "Interact with Pipelines Secrets" ,
96111 Subcommands : []cli.Command {
97112 SecretGetCommand ,
98113 },
99114 },
100115 {
101- Name : "step" ,
102- Usage : "Get or update an attribute of a build step, or cancel unfinished jobs for a step" ,
116+ Name : "step" ,
117+ Category : categoryJobCommands ,
118+ Usage : "Get or update an attribute of a build step, or cancel unfinished jobs for a step" ,
103119 Subcommands : []cli.Command {
104120 StepGetCommand ,
105121 StepUpdateCommand ,
@@ -109,7 +125,7 @@ var BuildkiteAgentCommands = []cli.Command{
109125 AgentStopCommand ,
110126 {
111127 Name : "tool" ,
112- Usage : "Utility commands, intended for users and operators of the agent to run directly on their machines, and not as part of a Buildkite job " ,
128+ Usage : "Utilities for working with the Buildkite Agent " ,
113129 Subcommands : []cli.Command {
114130 ToolKeygenCommand ,
115131 ToolSignCommand ,
0 commit comments