-
Notifications
You must be signed in to change notification settings - Fork 43
feat: embed binary in image when pushing image #234
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
Conversation
@@ -1354,6 +1355,74 @@ COPY --from=a /root/date.txt /date.txt`, testImageAlpine, testImageAlpine), | |||
}) | |||
} | |||
|
|||
func TestEmbedBinaryImage(t *testing.T) { |
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.
I would annotate this test file with given/when/then markers.
_, err = remote.Image(ref) | ||
require.NoError(t, err, "expected image to be present after build + push") | ||
|
||
ctx := context.Background() |
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.
It is not a problem at all, but a cleaner approach would be:
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
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.
Related to #216
Embeds the envbuilder binary in the image under the same path when pushing.
Depends on coder/kaniko#16