Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions padcli/command/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ func registerEmbeddedBuildFlags(cmd *cobra.Command, opts *embeddedBuildOptions)
"adds BUILDKIT_INLINE_CACHE=1 build arg to save cache metadata and also "+
"sets the cache-from docker build option",
)
_ = cmd.Flags().MarkHidden("remote-cache")

cmd.Flags().StringVar(
&opts.LocalImage,
Expand Down
24 changes: 4 additions & 20 deletions padcli/command/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ import (
"go.jetpack.io/launchpad/pkg/jetlog"
)

type envOptions struct {
projectConfigPath string
}

func envCmd() *cobra.Command {
opts := &envOptions{}
cmdCfg := &envcli.CmdConfig{}
command := &cobra.Command{
Use: "env",
Expand All @@ -31,15 +26,12 @@ func envCmd() *cobra.Command {
Securely stores and retrieves environment variables on the cloud.
Environment variables are always encrypted, which makes it possible to
store values that contain passwords and other secrets.

This command can only be run within a Launchpad project's directory (the directory
where launchpad.yaml is present)
`),
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
var absProjectPath string
var err error
if opts.projectConfigPath == "" {
absProjectPath, err = getProjectDir()
} else {
absProjectPath, err = absPath([]string{opts.projectConfigPath})
}
absProjectPath, err := getProjectDir()
if err != nil {
return errors.WithStack(err)
}
Expand Down Expand Up @@ -80,14 +72,6 @@ func envCmd() *cobra.Command {
},
}

command.PersistentFlags().StringVarP(
&opts.projectConfigPath,
"project",
"p",
"",
"Path to project config. If directory, we assume name is launchpad.yaml",
)

command.AddCommand(
envcli.SetCmd(cmdCfg),
envcli.RemoveCmd(cmdCfg),
Expand Down
10 changes: 7 additions & 3 deletions padcli/command/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,25 +181,31 @@ func registerDeployFlags(cmd *cobra.Command, opts *deployOptions) {
"",
"custom location for app chart",
)
_ = cmd.Flags().MarkHidden("helm.app.chart-location")

cmd.Flags().StringVar(
&opts.App.Name,
"helm.app.name",
"",
"App install name",
)
_ = cmd.Flags().MarkHidden("helm.app.name")

cmd.Flags().StringVar(
&opts.Runtime.SetValues,
"helm.runtime.set",
"",
"args passed to helm --set option for runtime (can specify multiple or separate values with commas: key1=val1,key2=val2)",
)
_ = cmd.Flags().MarkHidden("helm.runtime.set")

cmd.Flags().StringVar(
&opts.Runtime.ChartLocation,
"helm.runtime.chart-location",
"",
"custom location for runtime chart",
)
_ = cmd.Flags().MarkHidden("helm.runtime.chart-location")

cmd.Flags().StringVarP(
&opts.Namespace,
Expand Down Expand Up @@ -251,16 +257,14 @@ func registerDeployFlags(cmd *cobra.Command, opts *deployOptions) {
"",
envOverrideFlagMsg,
)
// Made env-override file flag hidden temporarily until we decide on concrete approach
// on whether override merges with launchpad env or skips it
_ = cmd.Flags().MarkHidden(envOverrideFlag)

cmd.Flags().StringVar(
&opts.execQualifiedSymbol,
"exec",
"",
"Execute a single cronjob or jetroutine for a given function.",
)
_ = cmd.Flags().MarkHidden("exec")

cmd.Flags().BoolVar(
&opts.ReinstallOnHelmUpgradeError,
Expand Down
2 changes: 1 addition & 1 deletion padcli/jetconfig/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package jetconfig

import "github.com/pkg/errors"

var ErrConfigNotFound = errors.New("jetconfig was not found")
var ErrConfigNotFound = errors.New("jetconfig (launchpad.yaml) was not found")
var ErrInvalidProjectID = errors.New("project ID is invalid")