Skip to content
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

Adds multi-arch support #44

Merged
merged 2 commits into from
Aug 1, 2024
Merged

Adds multi-arch support #44

merged 2 commits into from
Aug 1, 2024

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Jul 6, 2024

Summary

This adds two options for multi-arch support:

  1. It by default will build for the local architecture, as determined by runtime.GOARCH. This means you'll get a single-arch image, but it'll be for the correct architecture for your system.
  2. If you specify the --publish flag, it will build a full multi-arch image. This requires being published to a registry through, so it's not enabled by default.

Use Cases

Build arm64 images locally.

Ex: libpak-tools package bundle --buildpack-id paketo-buildpacks/amazon-corretto and you'll end up with an image relevant to your local machine.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

This adds two options for multi-arch support:

1. It by default will build for the local architecture, as determined by `runtime.GOARCH`. This means you'll get a single-arch image, but it'll be for the correct architecture for your system.
2. If you specify the `--publish` flag, it will build a full multi-arch image. This requires being published to a registry through, so it's not enabled by default.

Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa dmikusa added type:enhancement A general enhancement semver:minor A change requiring a minor version bump labels Jul 6, 2024
@dmikusa dmikusa requested a review from a team as a code owner July 6, 2024 15:20
@@ -246,6 +246,8 @@ func testBuildpack(t *testing.T, context spec.G, it spec.S) {

it.Before(func() {
mockExecutor = &mocks.Executor{}

t.Setenv("BP_ARCH", "amd64")
Copy link
Member

Choose a reason for hiding this comment

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

oh, you want to make sure the test runs whichever the platform it runs on

@dmikusa dmikusa merged commit 23260ff into main Aug 1, 2024
4 checks passed
@dmikusa dmikusa deleted the arm64 branch August 1, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants