From d64d1352ea5c7cbbd1e0ef33927edb6929e4fe3f Mon Sep 17 00:00:00 2001 From: Bruno Meneguele Date: Sun, 10 Oct 2021 18:38:09 -0300 Subject: [PATCH] ci: fix usage message regarding job name usage 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 --- cmd/ci_artifacts.go | 3 ++- cmd/ci_trace.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/ci_artifacts.go b/cmd/ci_artifacts.go index 1d4dc3d2..a0af28c9 100644 --- a/cmd/ci_artifacts.go +++ b/cmd/ci_artifacts.go @@ -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 @@ -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'`), diff --git a/cmd/ci_trace.go b/cmd/ci_trace.go index c375823f..73ef2bcc 100644 --- a/cmd/ci_trace.go +++ b/cmd/ci_trace.go @@ -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(` @@ -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'`),