From 8aded40d7104aa5e1ceccbb00683d55ab585b8df Mon Sep 17 00:00:00 2001 From: oshratz Date: Mon, 18 Nov 2024 08:57:10 +0200 Subject: [PATCH] Turn the signing key to be optional in RBP --- lifecycle/cli.go | 11 ----------- utils/cliutils/commandsflags.go | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/lifecycle/cli.go b/lifecycle/cli.go index 366ba25cf..da6c3d7d7 100644 --- a/lifecycle/cli.go +++ b/lifecycle/cli.go @@ -184,10 +184,6 @@ func promote(c *cli.Context) error { return cliutils.WrongNumberOfArgumentsHandler(c) } - if err := assertSigningKeyProvided(c); err != nil { - return err - } - lcDetails, err := createLifecycleDetailsByFlags(c) if err != nil { return err @@ -354,13 +350,6 @@ func validateDistributeCommand(c *cli.Context) error { return nil } -func assertSigningKeyProvided(c *cli.Context) error { - if c.String(cliutils.SigningKey) == "" { - return errorutils.CheckErrorf("the --%s option is mandatory", cliutils.SigningKey) - } - return nil -} - func createLifecycleDetailsByFlags(c *cli.Context) (*coreConfig.ServerDetails, error) { lcDetails, err := cliutils.CreateServerDetailsWithConfigOffer(c, true, commonCliUtils.Platform) if err != nil { diff --git a/utils/cliutils/commandsflags.go b/utils/cliutils/commandsflags.go index 446f84eff..c4060f8f5 100644 --- a/utils/cliutils/commandsflags.go +++ b/utils/cliutils/commandsflags.go @@ -1650,7 +1650,7 @@ var flagsMap = map[string]cli.Flag{ }, lcSigningKey: cli.StringFlag{ Name: SigningKey, - Usage: "[Mandatory] The GPG/RSA key-pair name given in Artifactory.` `", + Usage: "[Optional] The GPG/RSA key-pair name given in Artifactory. If not provided will create/use the default one` `", }, lcPathMappingPattern: cli.StringFlag{ Name: PathMappingPattern,