-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check tools and update outputs #68
Conversation
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
|
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
@@ -27,7 +28,7 @@ to quickly create a Cobra application.`, | |||
// todo this needs to be removed when we are no longer in the starter account | |||
os.Setenv("AWS_PROFILE", "starter") | |||
|
|||
fmt.Println("\n\nTODO -- need to setup and argocd delete against registry and wait?\n\n") | |||
log.Println("\n\nTODO -- need to setup and argocd delete against registry and wait?\n\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the line breaks won't be necessary with Println
@@ -62,7 +63,7 @@ to quickly create a Cobra application.`, | |||
tfInitGitlabCmd.Stderr = os.Stderr | |||
err = tfInitGitlabCmd.Run() | |||
if err != nil { | |||
fmt.Println("failed to call terraform init gitlab: ", err) | |||
log.Println("failed to call terraform init gitlab: ", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could make a single call to reduce functions size, like:
log.Panicf("failed to call terraform init GitLab: %s", err)
@@ -16,7 +17,7 @@ func setGlobals() { | |||
tmphome, err := os.UserHomeDir() | |||
home = tmphome | |||
if(err != nil){ | |||
fmt.Printf("Error Defining home - %s", err) | |||
log.Printf("Error Defining home - %s", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can do it later as well:
log.Panicf("...")
instead of log + exit(1) , panic
will clean up contexts, and close open http connections before exiting.
viper.Set("create.softserve.create", true) | ||
viper.WriteConfig() | ||
log.Println("waiting for soft-serve installation to complete...") | ||
time.Sleep(60 * time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be a good idea to add a todo:
to remember to update this blocker later on
|
||
err := os.Chdir(directory) | ||
if err != nil { | ||
log.Println("error changing dir") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we log and exit in this case?
execShellReturnStrings(terraformPath, fmt.Sprintf("%s", terraformAction), "-auto-approve") | ||
keyOut, _, errKey := execShellReturnStrings(terraformPath, "output", "vault_unseal_kms_key") | ||
if errKey != nil { | ||
log.Println("failed to call tfOutputCmd.Run(): ", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we log and exit in this case?
Updating on the next PR:#70 |
Adding some extra features to go-cli:
init
, printinfo
to logs and STDOUT.checktools
to validate download binaries, for compatibility check.execShellReturnStrings
Signed-off-by: 6za 53096417+6za@users.noreply.github.com