-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: allow customizable target arch/platform on make build command #360
feat: allow customizable target arch/platform on make build command #360
Conversation
9916339
to
819a7c0
Compare
@this-is-tobi This proposal LGTM, although I slightly prefer the way it is done in other mattermost repos.
Are you able to refactor this PR likewise? |
Minor. Let's change the release note as it is not a bug but an enhancement to support multiarch. f.e |
Hi @stafot, thanks for the comment ! I may try a refactor as you mentioned but it raises 2 questions for me :
A proposal for this PR would be :
Edit: Another option would be to use the new Let me know what you think. |
819a7c0
to
bc65191
Compare
@this-is-tobi You are correct about
For now I am ok with your current PR (Option 2) If you are willing in a future PR you can proceed with Option 1. |
bc65191
to
9cf7d31
Compare
What's the status of this @stafot ? |
Hi, I've been trying to investigate a deeper refactor to follow the Mattermost package release system but unfortunately I think I need more information about your release process (do you trigger the release manually or by pushing into the main branch? do you want to put the binaries in the github release? etc...). Also, I'm just starting to develop with golang and probably need to dive into golang's release options (flags, etc...). Finally, merging this PR will make the |
I think we do not need qemu a this stage since we don't use CGO in the operator (neither in the server IIRC) so we can rely on cross-compilation directly, letting the go compiler build the binaries for each arch. As @stafot suggested using buildx should be enough. Since this PR specifies arm64, cross-compilation should be enough for that and the default amd64 binaries. |
9cf7d31
to
5c4878c
Compare
QEMU action removed @stafot @fmartingr |
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.
This LGTM, it allows users to compile to their preferred platform by cloning the repository.
We would need to talk if we want to push/support multi-arch images ourselves, I'll leave that to @mattermost/cloud to decide.
This is great! Thanks for the contribution @this-is-tobi. |
@fmartingr I guess it will be done by the CI/CD :
We've come full circle, even if it's not the easiest |
Summary
This PR fix arm64 build.
Note: cf. https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope.
Ticket Link
Fixes #359.
Release Note