Skip to content

Commit

Permalink
Turn the signing key to be optional in RBP
Browse files Browse the repository at this point in the history
  • Loading branch information
oshratZairi committed Nov 18, 2024
1 parent c926e42 commit 8aded40
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions lifecycle/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8aded40

Please sign in to comment.