Improve Cloud Build builder#874
Merged
dgageot merged 5 commits intoGoogleContainerTools:masterfrom Aug 9, 2018
Merged
Conversation
Contributor
dgageot
commented
Aug 4, 2018
- Use "Cloud Build" name everywhere
- Make timeout configurable
- Improve build args handling
- Make docker image configurable
d735aea to
2d7d5b9
Compare
balopat
suggested changes
Aug 6, 2018
Contributor
balopat
left a comment
There was a problem hiding this comment.
small nits + ask for a testcase
deploy/cloudbuild.yaml
Outdated
| @@ -1,4 +1,4 @@ | |||
| # using default substitutions, provided by Google Container Builder | |||
| # using default substitutions, provided by Google Clodu Build | |||
examples/annotated-skaffold.yaml
Outdated
| # to be provided and the currently logged user should be given permissions to trigger | ||
| # new builds on GCB. | ||
| # | ||
| # new builds on Cloud Builder. |
|
|
||
| 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)...) |
Contributor
There was a problem hiding this comment.
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? :)
Contributor
Author
There was a problem hiding this comment.
Good idea! I added a test.
Contributor
Author
|
@balopat Should be good now |
2731c67 to
b45443f
Compare
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 Report
@@ 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
Continue to review full report at Codecov.
|
balopat
approved these changes
Aug 8, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.