diff --git a/cmd/document/document.go b/cmd/document/document.go index 16d0e6e53..fe4dde6b5 100644 --- a/cmd/document/document.go +++ b/cmd/document/document.go @@ -3,7 +3,6 @@ package document import ( "github.com/spf13/cobra" - "opendev.org/airship/airshipctl/cmd/document/secret" "opendev.org/airship/airshipctl/pkg/environment" ) @@ -15,7 +14,6 @@ func NewDocumentCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Com } documentRootCmd.AddCommand(NewDocumentPullCommand(rootSettings)) - documentRootCmd.AddCommand(secret.NewSecretCommand()) documentRootCmd.AddCommand(NewRenderCommand(rootSettings)) return documentRootCmd diff --git a/cmd/document/testdata/TestDocumentGoldenOutput/document-with-defaults.golden b/cmd/document/testdata/TestDocumentGoldenOutput/document-with-defaults.golden index 19aba23f7..aa02bac6a 100644 --- a/cmd/document/testdata/TestDocumentGoldenOutput/document-with-defaults.golden +++ b/cmd/document/testdata/TestDocumentGoldenOutput/document-with-defaults.golden @@ -7,7 +7,6 @@ Available Commands: help Help about any command pull pulls documents from remote git repository render Render documents from model - secret manages secrets Flags: -h, --help help for document diff --git a/cmd/root.go b/cmd/root.go index 17051a0f2..bd2d53946 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -13,6 +13,7 @@ import ( "opendev.org/airship/airshipctl/cmd/completion" "opendev.org/airship/airshipctl/cmd/config" "opendev.org/airship/airshipctl/cmd/document" + "opendev.org/airship/airshipctl/cmd/secret" "opendev.org/airship/airshipctl/pkg/environment" "opendev.org/airship/airshipctl/pkg/log" ) @@ -55,6 +56,7 @@ func AddDefaultAirshipCTLCommands(cmd *cobra.Command, settings *environment.Airs cmd.AddCommand(completion.NewCompletionCommand()) cmd.AddCommand(document.NewDocumentCommand(settings)) cmd.AddCommand(config.NewConfigCommand(settings)) + cmd.AddCommand(secret.NewSecretCommand()) return cmd } diff --git a/cmd/document/secret/generate/generate.go b/cmd/secret/generate/generate.go similarity index 100% rename from cmd/document/secret/generate/generate.go rename to cmd/secret/generate/generate.go diff --git a/cmd/document/secret/generate/masterpassphrase.go b/cmd/secret/generate/masterpassphrase.go similarity index 100% rename from cmd/document/secret/generate/masterpassphrase.go rename to cmd/secret/generate/masterpassphrase.go diff --git a/cmd/document/secret/secret.go b/cmd/secret/secret.go similarity index 85% rename from cmd/document/secret/secret.go rename to cmd/secret/secret.go index 9a02bab6a..5375971ff 100644 --- a/cmd/document/secret/secret.go +++ b/cmd/secret/secret.go @@ -3,7 +3,7 @@ package secret import ( "github.com/spf13/cobra" - "opendev.org/airship/airshipctl/cmd/document/secret/generate" + "opendev.org/airship/airshipctl/cmd/secret/generate" ) // NewSecretCommand creates a new command for managing airshipctl secrets diff --git a/cmd/testdata/TestRootGoldenOutput/rootCmd-with-defaults.golden b/cmd/testdata/TestRootGoldenOutput/rootCmd-with-defaults.golden index e0e0a89fb..343b5ff54 100644 --- a/cmd/testdata/TestRootGoldenOutput/rootCmd-with-defaults.golden +++ b/cmd/testdata/TestRootGoldenOutput/rootCmd-with-defaults.golden @@ -10,6 +10,7 @@ Available Commands: config Modify airshipctl config files document manages deployment documents help Help about any command + secret manages secrets version Show the version number of airshipctl Flags: