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

Add --target parameter with kaniko on Google Cloud Build #3462

Merged
merged 3 commits into from
Jan 2, 2020

Conversation

hwanjin-jeong
Copy link
Contributor

Fixes #3399

@codecov
Copy link

codecov bot commented Dec 31, 2019

Codecov Report

Merging #3462 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/build/gcb/kaniko.go 89.74% <100%> (+11.36%) ⬆️
pkg/skaffold/util/tar.go 57.47% <0%> (+4.59%) ⬆️

@dgageot dgageot added the kokoro:run runs the kokoro jobs on a PR label Dec 31, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Dec 31, 2019
@@ -36,6 +36,7 @@ func (b *Builder) kanikoBuildSpec(artifact *latest.KanikoArtifact, tag string) (
kanikoArgs := []string{
"--destination", tag,
"--dockerfile", artifact.DockerfilePath,
"--target", artifact.Target,
Copy link
Contributor

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.

Copy link
Contributor Author

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",
Copy link
Contributor

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?

Copy link
Contributor Author

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?

@dgageot dgageot added the kokoro:run runs the kokoro jobs on a PR label Jan 1, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jan 1, 2020
@dgageot dgageot self-assigned this Jan 1, 2020
@dgageot dgageot merged commit 56e77e7 into GoogleContainerTools:master Jan 2, 2020
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.

4 participants