-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Unify Jib command wrapper usage #1105
Unify Jib command wrapper usage #1105
Conversation
Codecov Report
@@ Coverage Diff @@
## jib_skaffold #1105 +/- ##
================================================
+ Coverage 42.94% 43.37% +0.42%
================================================
Files 82 78 -4
Lines 3600 3341 -259
================================================
- Hits 1546 1449 -97
+ Misses 1912 1759 -153
+ Partials 142 133 -9
Continue to review full report at Codecov.
|
}, | ||
}, | ||
{ | ||
description: "gradle with wrapper", | ||
jibGradleArtifact: latest.JibGradleArtifact{}, | ||
filesInWorkspace: []string{getWrapperGradle()}, | ||
filesInWorkspace: []string{"gradle", "gradle.cmd"}, |
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.
Is this supposed to be gradlew
? Maybe these tests should check the command uses the wrapper?
func (cw CommandWrapper) CreateCommand(ctx context.Context, workingDir string, args []string) *exec.Cmd { | ||
executable := cw.Executable | ||
|
||
if cw.Wrapper != "" && !SkipWrapperCheck { |
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.
I noticed SkipWrapperCheck
is always false - was this intentional?
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.
For tests. I should use that in #1152's tests.
Create a new
CommandWrapper
structure to specify the executable and wrapper names. Command lines are generated by aCommandWrapper#CreateCommand()
method. I found examples of Maven having a .bat and .cmd wrappers, so we leave the extension determining to theCreateCommand()
method.The builder codepath passes along a context, but the dependency-tracking codepath does not (#1104) so I pass along a dummy context for now.