Browse Source

add some debug

pull/78/head
Chris Mague 7 years ago
parent
commit
7a16c355ad
  1. 6
      plugin.go

6
plugin.go

@ -62,7 +62,6 @@ func (p Plugin) Exec() error {
// Install a extra PEM key if required // Install a extra PEM key if required
if len(os.Getenv("PEM_NAME")) > 0 { if len(os.Getenv("PEM_NAME")) > 0 {
fmt.Println("--- Setting a pem file ---")
value, exists := os.LookupEnv("PEM_CONTENTS") value, exists := os.LookupEnv("PEM_CONTENTS")
if !exists { if !exists {
value = "-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----\n" value = "-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----\n"
@ -76,7 +75,6 @@ func (p Plugin) Exec() error {
// Install a Github SSH key // Install a Github SSH key
if len(os.Getenv("GITHUB_PRIVATE_SSH_KEY")) > 0 { if len(os.Getenv("GITHUB_PRIVATE_SSH_KEY")) > 0 {
fmt.Println("--- Setting a Github key ---")
sshconfErr := installGithubSsh(os.Getenv("GITHUB_PRIVATE_SSH_KEY")) sshconfErr := installGithubSsh(os.Getenv("GITHUB_PRIVATE_SSH_KEY"))
if sshconfErr != nil { if sshconfErr != nil {
@ -85,7 +83,6 @@ func (p Plugin) Exec() error {
} }
// Install an AWS profile if env var is set // Install an AWS profile if env var is set
fmt.Println("--- Setting an AWS profile ---")
if len(os.Getenv("AWS_ACCESS_KEY_ID")) > 0 { if len(os.Getenv("AWS_ACCESS_KEY_ID")) > 0 {
profileErr := installProfile(os.Getenv("AWS_PROFILE"), os.Getenv("AWS_ACCESS_KEY_ID"), os.Getenv("AWS_SECRET_ACCESS_KEY")) profileErr := installProfile(os.Getenv("AWS_PROFILE"), os.Getenv("AWS_ACCESS_KEY_ID"), os.Getenv("AWS_SECRET_ACCESS_KEY"))
@ -279,8 +276,11 @@ func tfApply(config Config) *exec.Cmd {
args = append(args, fmt.Sprintf("-lock-timeout=%s", config.InitOptions.LockTimeout)) args = append(args, fmt.Sprintf("-lock-timeout=%s", config.InitOptions.LockTimeout))
} }
if config.PlanPath != "" { if config.PlanPath != "" {
fmt.Println("--- Setting an outpath---")
args = append(args, config.PlanPath) args = append(args, config.PlanPath)
} else { } else {
fmt.Println("--- borked ---")
fmt.Println(config.PlanPath)
args = append(args, "plan.tfout") args = append(args, "plan.tfout")
} }
return exec.Command( return exec.Command(

Loading…
Cancel
Save