Skip to content
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

Prototype terraform deployment #671

Merged
merged 1 commit into from
Aug 21, 2020
Merged

Prototype terraform deployment #671

merged 1 commit into from
Aug 21, 2020

Conversation

nghialv
Copy link
Member

@nghialv nghialv commented Aug 21, 2020

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

/cc @nakabonne

Copy link
Collaborator

@pipecd-bot pipecd-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GO_LINTER

Some issues were detected while linting go source files in your changes.

pkg/app/piped/executor/terraform/terraform.go Show resolved Hide resolved
@pipecd-bot
Copy link
Collaborator

TODO

The following ISSUES will be created once got merged. If you want me to skip creating the issue, you can use /todo skip command.

Details

1. Remove this -no-color flag after parsePlanResult supports parsing the message containing color codes.

https://github.com/pipe-cd/pipe/blob/e3a8f3156caf93290cb213b8e1de615ad99ad771/pkg/app/piped/cloudprovider/terraform/terraform.go#L109-L112

This was created by todo plugin since "TODO:" was found in e3a8f31 when #671 was merged. cc: @nghialv.

@pipecd-bot pipecd-bot added size/XL and removed size/L labels Aug 21, 2020
Copy link
Collaborator

@pipecd-bot pipecd-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GO_LINTER

Some issues were detected while linting go source files in your changes.

pkg/app/piped/executor/terraform/terraform.go Show resolved Hide resolved
@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 20.12%. This pull request decreases coverage by -0.60%.

File Function Base Head Diff
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.Version -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.Init -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.SelectWorkspace -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go PlanResult.NoChanges -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.Plan -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go parsePlanResult -- 0.00% +0.00%
pkg/app/piped/executor/terraform/apply.go Executor.ensureApply -- 0.00% +0.00%
pkg/app/piped/executor/terraform/plan.go Executor.ensurePlan -- 0.00% +0.00%
pkg/app/piped/executor/terraform/rollback.go Executor.ensureRollback -- 0.00% +0.00%
pkg/app/piped/executor/terraform/sync.go Executor.ensureSync -- 0.00% +0.00%
pkg/app/piped/executor/terraform/terraform.go Executor.showUsingVersion -- 0.00% +0.00%
pkg/app/piped/executor/terraform/terraform.go Executor.selectWorkspace -- 0.00% +0.00%
pkg/app/piped/executor/terraform/terraform.go prepareCredentialsDirectory -- 0.00% +0.00%
pkg/app/piped/logpersister/stagelogpersister.go stageLogPersister.Write -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.Apply 0.00% 0.00% +0.00%
pkg/app/piped/executor/terraform/terraform.go Executor.Execute 0.00% 0.00% +0.00%
pkg/app/piped/executor/terraform/terraform.go Executor.findTerraform 0.00% 0.00% +0.00%
pkg/app/piped/planner/terraform/terraform.go Planner.Plan 0.00% 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.Changes 0.00% -- +-0.00%
pkg/app/piped/executor/terraform/terraform.go Executor.ensureSync 0.00% -- +-0.00%
pkg/app/piped/executor/terraform/terraform.go Executor.ensurePlan 0.00% -- +-0.00%
pkg/app/piped/executor/terraform/terraform.go Executor.ensureApply 0.00% -- +-0.00%
pkg/app/piped/executor/terraform/terraform.go Executor.ensureRollback 0.00% -- +-0.00%

cmd.Stdout = w
cmd.Stderr = w

io.WriteString(w, fmt.Sprintf("terraform %s", strings.Join(args, " ")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to check an error?

cmd.Stdout = stdout
cmd.Stderr = stdout

io.WriteString(w, fmt.Sprintf("terraform %s", strings.Join(args, " ")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to check an error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is just a log.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

cmd.Stdout = w
cmd.Stderr = w

io.WriteString(w, fmt.Sprintf("terraform %s", strings.Join(args, " ")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well, but it's up to you.

Copy link
Member

@nakabonne nakabonne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work.

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nakabonne.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants