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

feat(ko): Google Cloud Build remote builds for the ko builder #7650

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

halvards
Copy link
Contributor

Enables remote builds on Google Cloud Build when using the Skaffold ko builder.

Since Skaffold embeds ko as a module, the Cloud Build step uses the skaffold binary to build and push the image. Since the gcr.io/k8s-skaffold/skaffold image contains the Go distribution, we can use this image on Cloud Build. This means that we don't need to create and maintain a separate ko builder image for Cloud Build.

Tracking: #7131
Related: #7258

@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #7650 (d74ff3b) into main (290280e) will decrease coverage by 3.84%.
The diff coverage is 53.95%.

@@            Coverage Diff             @@
##             main    #7650      +/-   ##
==========================================
- Coverage   70.48%   66.64%   -3.85%     
==========================================
  Files         515      585      +70     
  Lines       23150    28007    +4857     
==========================================
+ Hits        16317    18664    +2347     
- Misses       5776     7984    +2208     
- Partials     1057     1359     +302     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/test.go 44.44% <0.00%> (ø)
cmd/skaffold/skaffold.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/inspect_tests.go 62.50% <14.28%> (-1.14%) ⬇️
cmd/skaffold/app/cmd/render.go 35.48% <18.18%> (-5.90%) ⬇️
cmd/skaffold/app/cmd/lsp.go 28.12% <28.12%> (ø)
cmd/skaffold/app/cmd/run.go 64.28% <33.33%> (-9.63%) ⬇️
cmd/skaffold/app/cmd/fix.go 55.93% <38.88%> (-20.54%) ⬇️
cmd/skaffold/app/cmd/verify.go 41.17% <41.17%> (ø)
... and 329 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Enables remote builds on Google Cloud Build when using the Skaffold `ko`
builder.

Since Skaffold embeds ko as a module, the Cloud Build step uses the
`skaffold` binary to build and push the image. This means that we don't
need to create and maintain a separate `ko` builder image.

Tracking: GoogleContainerTools#7131
Related: GoogleContainerTools#7258
Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

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

LGTM!


func skaffoldGCBEnv(env ...string) []string {
defaultEnv := []string{
"SKAFFOLD_DETECT_MINIKUBE=false",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@tejal29 tejal29 merged commit 59231b2 into GoogleContainerTools:main Jul 18, 2022
@halvards halvards deleted the ko-gcb branch July 27, 2022 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants