Skip to content

Commit

Permalink
Set n to shorthand for component everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Sep 26, 2024
1 parent f1026f6 commit d79e04b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/createDeployPipelineJob.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func init() {
createDeployPipelineJobCmd.Flags().StringP(flagnames.User, "u", "", "The user who triggered the deploy")
createDeployPipelineJobCmd.Flags().StringToStringP(flagnames.ImageTagName, "t", map[string]string{}, "Image tag name for a component: component-name=tag-name. Multiple pairs can be specified.")
createDeployPipelineJobCmd.Flags().StringP(flagnames.CommitID, "i", "", "An optional 40 character commit id to tag the new pipeline job")
createDeployPipelineJobCmd.Flags().StringSlice(flagnames.Component, []string{}, "Optional component to deploy, when only specific component need to be deployed. Multiple components can be specified.")
createDeployPipelineJobCmd.Flags().StringSliceP(flagnames.Component, "n", []string{}, "Optional component to deploy, when only specific component need to be deployed. Multiple components can be specified.")
createDeployPipelineJobCmd.Flags().BoolP(flagnames.Follow, "f", false, "Follow deploy")
_ = createDeployPipelineJobCmd.RegisterFlagCompletionFunc(flagnames.Application, completion.ApplicationCompletion)
_ = createDeployPipelineJobCmd.RegisterFlagCompletionFunc(flagnames.Environment, completion.EnvironmentCompletion)
Expand Down
2 changes: 1 addition & 1 deletion cmd/logsEnvironmentComponent.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func init() {
logsCmd.AddCommand(logsEnvironmentComponentCmd)
logsEnvironmentComponentCmd.Flags().StringP(flagnames.Application, "a", "", "Name of the application owning the component")
logsEnvironmentComponentCmd.Flags().StringP(flagnames.Environment, "e", "", "Environment the component runs in")
logsEnvironmentComponentCmd.Flags().String(flagnames.Component, "", "The component to follow")
logsEnvironmentComponentCmd.Flags().StringP(flagnames.Component, "n", "", "The component to follow")
logsEnvironmentComponentCmd.Flags().BoolP(flagnames.Previous, "p", false, "If set, print the logs for the previous instance of the container in a component pod, if it exists")
logsEnvironmentComponentCmd.Flags().DurationP(flagnames.Since, "s", settings.DeltaRefreshApplication, "If set, start get logs from the specified time, eg. 5m or 12h")

Expand Down
6 changes: 5 additions & 1 deletion cmd/setExternalDnsTls.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ var setExternalDnsTlsCmd = &cobra.Command{
Example: `# Read certificate and private key from file
rx set external-dns-tls --application myapp --environment prod --component web --alias myapp.example.com --certificate-from-file "cert.crt" --private-key-from-file "cert.key" `,
RunE: func(cmd *cobra.Command, args []string) error {

completion.AliasCompletion(cmd, []string{}, "")

appName, err := config.GetAppNameFromConfigOrFromParameter(cmd, flagnames.Application)
if err != nil {
return err
Expand Down Expand Up @@ -143,7 +146,7 @@ func isComponentExternalDNSReconciled(apiClient *apiclient.Radixapi, appName, en
func init() {
setExternalDnsTlsCmd.Flags().StringP(flagnames.Application, "a", "", "Name of the application")
setExternalDnsTlsCmd.Flags().StringP(flagnames.Environment, "e", "", "Name of the environment")
setExternalDnsTlsCmd.Flags().String(flagnames.Component, "", "Name of the component")
setExternalDnsTlsCmd.Flags().StringP(flagnames.Component, "n", "", "Name of the component")
setExternalDnsTlsCmd.Flags().String(flagnames.Alias, "", "External DNS alias to update")
setExternalDnsTlsCmd.Flags().String(flagnames.Certificate, "", "Certificate (PEM format)")
setExternalDnsTlsCmd.Flags().String(flagnames.CertificateFromFile, "", "Read certificate (PEM format) from file")
Expand All @@ -160,6 +163,7 @@ func init() {
_ = setExternalDnsTlsCmd.RegisterFlagCompletionFunc(flagnames.Application, completion.ApplicationCompletion)
_ = setExternalDnsTlsCmd.RegisterFlagCompletionFunc(flagnames.Environment, completion.EnvironmentCompletion)
_ = setExternalDnsTlsCmd.RegisterFlagCompletionFunc(flagnames.Component, completion.ComponentCompletion)
_ = setExternalDnsTlsCmd.RegisterFlagCompletionFunc(flagnames.Alias, completion.AliasCompletion)

setContextSpecificPersistentFlags(setExternalDnsTlsCmd)
setCmd.AddCommand(setExternalDnsTlsCmd)
Expand Down

0 comments on commit d79e04b

Please sign in to comment.