Enable ssh configration for pipedv1#6201
Conversation
Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6201 +/- ##
==========================================
- Coverage 28.80% 28.78% -0.03%
==========================================
Files 559 559
Lines 59568 59520 -48
==========================================
- Hits 17160 17132 -28
+ Misses 41094 41074 -20
Partials 1314 1314
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if cfg.Git.ShouldConfigureSSHConfig() { | ||
| if _, err := git.AddSSHConfig(cfg.Git); err != nil { | ||
| input.Logger.Error("failed to configure ssh-config", zap.Error(err)) | ||
| return err | ||
| } | ||
| input.Logger.Info("successfully configured ssh-config") | ||
| } |
There was a problem hiding this comment.
Should update to remove ssh key file as we do for pipedv0
ref:
pipecd/pkg/app/piped/cmd/piped/piped.go
Lines 180 to 189 in 3415269
There was a problem hiding this comment.
Thank you, will fix it.
Note: It is supported in the PR #5769
| "text/template" | ||
|
|
||
| "github.com/pipe-cd/pipecd/pkg/config" | ||
| configv1 "github.com/pipe-cd/pipecd/pkg/configv1" |
There was a problem hiding this comment.
| configv1 "github.com/pipe-cd/pipecd/pkg/configv1" | |
| "github.com/pipe-cd/pipecd/pkg/configv1" |
Or how about making this like we did in pipedv1 entry
ref: https://github.com/pipe-cd/pipecd/blob/master/pkg/app/pipedv1/cmd/piped/piped.go#L72
There was a problem hiding this comment.
@khanhtc1202
This package is for both pipedv0 and pipedv1, so it would be nice to distinguish config and configv1 to avoid misinterpreting them.
So I think it is good as is.
WDYT?
Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
| @@ -168,13 +168,15 @@ func (p *piped) run(ctx context.Context, input cli.Input) (runErr error) { | |||
| registry := registerMetrics(cfg.PipedID, cfg.ProjectID, p.launcherVersion) | |||
|
|
|||
| // // Configure SSH config if needed. | |||
There was a problem hiding this comment.
| // // Configure SSH config if needed. | |
| // Configure SSH config if needed. |
nits
What this PR does:
as title
To realize this, we decided to define a type alias for
configv1.PipedGitinpkg/config.Currently, it's ok because
configv1.PipedGitandconfig.PipedGitare the same definition.configv1.PipedGit.We decided to do it to fix the config easily in the future, and we will support only pipedv1.
Why we need it:
The current pipedv1 can't clone git repo with ssh.
Which issue(s) this PR fixes:
Part of #5259
Does this PR introduce a user-facing change?: