Skip to content

Commit

Permalink
ci: fix usage message regarding job name usage
Browse files Browse the repository at this point in the history
The job name can be used after a colom ':', without any branch name, to
retrieve that job artifacts or trace information. This was not well
documented and this patch fixes it.

Signed-off-by: Bruno Meneguele <[email protected]>
  • Loading branch information
bmeneg committed Oct 10, 2021
1 parent d8bf08c commit d64d135
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/ci_artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

var ciArtifactsCmd = &cobra.Command{
Use: "artifacts [remote] [branch[:job]]",
Use: "artifacts [remote] [branch][:job]",
Short: "Download artifacts of a ci job",
Long: heredoc.Doc(`
Download the CI pipeline job artifacts for the given or current branch if
Expand All @@ -25,6 +25,7 @@ var ciArtifactsCmd = &cobra.Command{
and which, for this specific case, must be quoted.`),
Example: heredoc.Doc(`
lab ci artifacts upstream feature_branch
lab ci artifacts upstream :'my custom stage'
lab ci artifacts upstream 125 --merge-request
lab ci artifacts upstream 125:'my custom stage' --merge-request
lab ci artifacts upstream 125:'build' --merge-request --bridge 'security-tests'`),
Expand Down
3 changes: 2 additions & 1 deletion cmd/ci_trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

// ciLintCmd represents the lint command
var ciTraceCmd = &cobra.Command{
Use: "trace [remote] [branch[:job]]",
Use: "trace [remote] [branch][:job]",
Aliases: []string{"logs"},
Short: "Trace the output of a ci job",
Long: heredoc.Doc(`
Expand All @@ -35,6 +35,7 @@ var ciTraceCmd = &cobra.Command{
and which, for this specific case, must be quoted.`),
Example: heredoc.Doc(`
lab ci trace upstream feature_branch
lab ci trace upstream :'my custom stage'
lab ci trace upstream 18 --merge-request
lab ci trace upstream 18:'my custom stage' --merge-request
lab ci trace upstream 18:'my custom stage' --merge-request --bridge 'security-tests'`),
Expand Down

0 comments on commit d64d135

Please sign in to comment.