-
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
Add --target parameter with kaniko on Google Cloud Build #3462
Conversation
Codecov Report
|
pkg/skaffold/build/gcb/kaniko.go
Outdated
@@ -36,6 +36,7 @@ func (b *Builder) kanikoBuildSpec(artifact *latest.KanikoArtifact, tag string) ( | |||
kanikoArgs := []string{ | |||
"--destination", tag, | |||
"--dockerfile", artifact.DockerfilePath, | |||
"--target", artifact.Target, |
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.
Although it works well with an empty target, I'd rather add the --target
only if the target is set. That feels better. You'd have to test both cases then.
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.
thanks for your advice.
"--build-arg", "arg1=value1", | ||
"--build-arg", "arg2", | ||
"--cache", | ||
"--target", "builder", |
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.
Could you test for both cases?
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.
sorry, i late for refactoring.
do you have any suggestions?
Fixes
#3399