Skip to content

Commit

Permalink
use cwd instead of home directory for kotsadm and app manifests (#2029)
Browse files Browse the repository at this point in the history
* use cwd instead of home directory for kotsadm and app manifests
  • Loading branch information
sgalsaleh committed Aug 4, 2021
1 parent 2fae75b commit 55dee34
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ jobs:
kubectl create ns nginx-test
kubectl create ns redis-test
kubectl create ns postgres-test
kustomize build $HOME/$APP_SLUG/overlays/midstream | kubectl apply -f -
kustomize build $PWD/$APP_SLUG/overlays/midstream | kubectl apply -f -
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func AdminGenerateManifestsCmd() *cobra.Command {
},
}

cmd.Flags().String("rootdir", homeDir(), "root directory that will be used to write the yaml to")
cmd.Flags().String("rootdir", ".", "root directory that will be used to write the yaml to")
cmd.Flags().String("http-proxy", "", "sets HTTP_PROXY environment variable in all KOTS Admin Console components")
cmd.Flags().String("https-proxy", "", "sets HTTPS_PROXY environment variable in all KOTS Admin Console components")
cmd.Flags().String("no-proxy", "", "sets NO_PROXY environment variable in all KOTS Admin Console components")
Expand Down
8 changes: 1 addition & 7 deletions cmd/kots/cli/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,7 @@ func DownloadCmd() *cobra.Command {
},
}

defaultDest := homeDir()
cwd, err := os.Getwd()
if err == nil {
defaultDest = cwd
}

cmd.Flags().String("dest", defaultDest, "the directory to store the application in")
cmd.Flags().String("dest", ".", "the directory to store the application in")
cmd.Flags().Bool("overwrite", false, "overwrite any local files, if present")
cmd.Flags().String("slug", "", "the application slug to download")
cmd.Flags().Bool("decrypt-password-values", false, "decrypt password values to plaintext")
Expand Down
2 changes: 1 addition & 1 deletion cmd/kots/cli/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func PullCmd() *cobra.Command {

cmd.Flags().StringSlice("set", []string{}, "values to pass to helm when running helm template")
cmd.Flags().String("repo", "", "repo uri to use when downloading a helm chart")
cmd.Flags().String("rootdir", homeDir(), "root directory that will be used to write the yaml to")
cmd.Flags().String("rootdir", ".", "root directory that will be used to write the yaml to")
cmd.Flags().StringP("namespace", "n", "default", "namespace to render the upstream to in the base")
cmd.Flags().StringSlice("downstream", []string{}, "the list of any downstreams to create/update")
cmd.Flags().String("local-path", "", "specify a local-path to pull a locally available replicated app (only supported on replicated app types currently)")
Expand Down

0 comments on commit 55dee34

Please sign in to comment.