Skip to content

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

Merged
merged 11 commits into from
Jun 24, 2024
Merged

Conversation

BrunoQuaresma
Copy link
Contributor

@BrunoQuaresma BrunoQuaresma commented Jun 12, 2024

Related to #216

Embeds the envbuilder binary in the image under the same path when pushing.

Depends on coder/kaniko#16

@BrunoQuaresma BrunoQuaresma requested a review from johnstcn June 12, 2024 19:22
@BrunoQuaresma BrunoQuaresma self-assigned this Jun 12, 2024
@@ -1354,6 +1355,74 @@ COPY --from=a /root/date.txt /date.txt`, testImageAlpine, testImageAlpine),
})
}

func TestEmbedBinaryImage(t *testing.T) {
Copy link
Member

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()
Copy link
Member

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()

@johnstcn johnstcn assigned johnstcn and unassigned BrunoQuaresma Jun 14, 2024
@johnstcn johnstcn changed the title test: add tests to verify embed binary image feat: embed binary in image when pushing image Jun 23, 2024
@johnstcn johnstcn requested review from mtojek and mafredri June 23, 2024 13:00
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

👍

It is really fortunate that API was exposed.

EDIT:

Oh, I see you added it here.

@johnstcn johnstcn merged commit 7ebdf44 into main Jun 24, 2024
4 checks passed
@johnstcn johnstcn deleted the bq/embed-binary branch June 24, 2024 11:02
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