From 28c425012e148a3ad7fa3d6520de08b145931a2a Mon Sep 17 00:00:00 2001 From: Gaurang Kudale Date: Wed, 11 Oct 2023 04:17:12 +0530 Subject: [PATCH] feat(cli): add the repo-example (#15690) (#15865) * updating the repo-example Signed-off-by: Author Name gaurang.kudale02@gmail.com Signed-off-by: Gaurang Kudale * update the repo.go for rm Signed-off-by: Author Name gaurang.kudale02@gmail.com Signed-off-by: Gaurang Kudale * update the reverting changes Signed-off-by: Author Name gaurang.kudale02@gmail.com Signed-off-by: Gaurang Kudale --------- Signed-off-by: Gaurang Kudale Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com> --- cmd/argocd/commands/repo.go | 13 +++++++++++++ docs/user-guide/commands/argocd_repo.md | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/cmd/argocd/commands/repo.go b/cmd/argocd/commands/repo.go index 09f51ae4d5aeb..2bf9714a06f11 100644 --- a/cmd/argocd/commands/repo.go +++ b/cmd/argocd/commands/repo.go @@ -29,6 +29,19 @@ func NewRepoCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command { c.HelpFunc()(c, args) os.Exit(1) }, + Example: ` +# Add git repository connection parameters +argocd repo add git@git.example.com:repos/repo + +# Get a Configured Repository by URL +argocd repo get https://github.com/yourusername/your-repo.git + +# List Configured Repositories +argocd repo list + +# Remove Repository Credentials +argocd repo rm https://github.com/yourusername/your-repo.git +`, } command.AddCommand(NewRepoAddCommand(clientOpts)) diff --git a/docs/user-guide/commands/argocd_repo.md b/docs/user-guide/commands/argocd_repo.md index 6e44d21c55b51..cfc1bd4aba35a 100644 --- a/docs/user-guide/commands/argocd_repo.md +++ b/docs/user-guide/commands/argocd_repo.md @@ -8,6 +8,24 @@ Manage repository connection parameters argocd repo [flags] ``` +### Examples + +``` + +# Add git repository connection parameters +argocd repo add git@git.example.com:repos/repo + +# Get a Configured Repository by URL +argocd repo get https://github.com/yourusername/your-repo.git + +# List Configured Repositories +argocd repo list + +# Remove Repository Credentials +argocd repo rm https://github.com/yourusername/your-repo.git + +``` + ### Options ```