Skip to content

Improve Cloud Build builder#874

Merged
dgageot merged 5 commits intoGoogleContainerTools:masterfrom
dgageot:improve-gcb
Aug 9, 2018
Merged

Improve Cloud Build builder#874
dgageot merged 5 commits intoGoogleContainerTools:masterfrom
dgageot:improve-gcb

Conversation

@dgageot
Copy link
Copy Markdown
Contributor

@dgageot dgageot commented Aug 4, 2018

  • Use "Cloud Build" name everywhere
  • Make timeout configurable
  • Improve build args handling
  • Make docker image configurable

@dgageot dgageot requested review from balopat and r2d4 as code owners August 4, 2018 08:08
@dgageot dgageot force-pushed the improve-gcb branch 3 times, most recently from d735aea to 2d7d5b9 Compare August 6, 2018 17:55
Copy link
Copy Markdown
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

small nits + ask for a testcase

@@ -1,4 +1,4 @@
# using default substitutions, provided by Google Container Builder
# using default substitutions, provided by Google Clodu Build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cloud?

# to be provided and the currently logged user should be given permissions to trigger
# new builds on GCB.
#
# new builds on Cloud Builder.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Build?


args := append([]string{"build", "--tag", artifact.ImageName, "-f", artifact.DockerArtifact.DockerfilePath}, buildArgs...)
args := append([]string{"build", "--tag", artifact.ImageName, "-f", artifact.DockerArtifact.DockerfilePath})
args = append(args, docker.GetBuildArgs(artifact.DockerArtifact)...)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice! so this is basically a bugfix besides being a dedupe, right? docker.GetBuildArgs handles the "single" build args, while this code above was assuming all buildargs were key-value type. Can we cover this with a testcase? :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea! I added a test.

@dgageot
Copy link
Copy Markdown
Contributor Author

dgageot commented Aug 7, 2018

@balopat Should be good now

@dgageot dgageot force-pushed the improve-gcb branch 5 times, most recently from 2731c67 to b45443f Compare August 7, 2018 20:30
dgageot added 5 commits August 8, 2018 10:00
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Also remove some code duplication

Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 8, 2018

Codecov Report

Merging #874 into master will increase coverage by 0.9%.
The diff coverage is 88%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #874     +/-   ##
=========================================
+ Coverage   37.48%   38.38%   +0.9%     
=========================================
  Files          54       54             
  Lines        2521     2519      -2     
=========================================
+ Hits          945      967     +22     
+ Misses       1465     1441     -24     
  Partials      111      111
Impacted Files Coverage Δ
pkg/skaffold/build/gcb/types.go 50% <0%> (ø) ⬆️
pkg/skaffold/build/gcb/cloud_build.go 13.66% <91.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e7b7d2...42c5d7e. Read the comment docs.

@dgageot dgageot merged commit 62a4fef into GoogleContainerTools:master Aug 9, 2018
@dgageot dgageot deleted the improve-gcb branch December 28, 2018 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants