-
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
Implement required artifact resolution for cluster builder #4992
Implement required artifact resolution for cluster builder #4992
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4992 +/- ##
==========================================
- Coverage 72.16% 72.14% -0.03%
==========================================
Files 363 363
Lines 12762 12772 +10
==========================================
+ Hits 9210 9214 +4
- Misses 2866 2874 +8
+ Partials 686 684 -2
Continue to review full report at Codecov.
|
@@ -294,7 +294,7 @@ func TestBuildArgs(t *testing.T) { | |||
for _, test := range tests { | |||
testutil.Run(t, "", func(t *testutil.T) { | |||
tmpDir := t.NewTempDir() | |||
tmpDir.Write("./Dockerfile", "ARG SKAFFOLD_GO_GCFLAGS\nFROM foo") | |||
tmpDir.Write("./Dockerfile", "ARG SKAFFOLD_GO_GCFLAGS\nFROM foo\nCMD bar") |
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.
Out of curiosity, why is the CMD bar
necessary?
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.
In #4943 we added additional Dockerfile validation that fails if there isn't atleast one valid command in the Dockerfile.
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.
That needs to be fixed as ENTRYPOINT
and CMD
are inherited from the base image.
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.
You're right. I removed the CMD
and tests were fine. I was probably getting error on an empty Dockerfile and I thought this was it.
47a6787
to
ca71321
Compare
Related: #4713, #4922
Description (Part 6 of several PRs.)
This PR implements resolving required artifacts as build args in the kaniko and custom cluster builder as described in the design for supporting dependencies between build artifacts.
A lot of files show as modified since I had to modify the signature of function
docker.EvalBuildArgs
to reuse with theKanikoArtifact
:The main changes are in
cluster.go
to add the calculated build args to theKanikoArtifact
.