-
Notifications
You must be signed in to change notification settings - Fork 241
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
Multiarch enablement on Dockerfile and Dockerfile.build #538
Conversation
Code Climate has analyzed commit 3f0fba6 and detected 0 issues on this pull request. View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## master #538 +/- ##
======================================
Coverage 86.7% 86.7%
======================================
Files 26 26
Lines 3556 3556
======================================
Hits 3082 3082
Misses 328 328
Partials 146 146 Continue to review full report at Codecov.
|
Thanks for this!
I scanned the issue and it seem to relate to go 1.18 not 1.17? Are you sure https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh doesn't work? In general I prefer ubuntu to debian/alpine/... but I guess it doesn't matter too much if in the end the from scratch images perform and are still small I don't see this plugged in into the actual https://github.com/fortio/fortio/blob/master/release/release.sh though or to create multiple images or is that somehow automatic and will create multiple images selectable by arch? |
Hello @ldemailly,
building with go 1.17.z and using the previous script fails, at least, on ARM. We could either bump to go1.18 and use the script to install golang-ci-lint, or we can keep on go1.17 but using the
I did it to not delegate here the responsibility to keep these lines in sync for each architecture.
I'm pushing right now another commit that also enables the CI for multi-arch by using Github actions as you are doing already. Note that Github actions only provide x86_64 servers to run the jobs. Hence, the only way I got to make it architecture-aware is by using docker buildx, and cross-building capabilities from the golang compiler and qemu. Here is the summary of the changes:
A successful run of the CI is available at https://github.com/aleskandro/fortio/runs/5818686964?check_suite_focus=true I needed to update the .build image manually before. Also, the release took a lot time more to build for each arch. The error from golangci-lint
|
e573d66
to
742edae
Compare
- Switching build image to golang:1.17.8 - Changes golangci-lint installation due to golangci/golangci-lint#2374 - Building windows/mac binaries only when architecture is amd64 in fortio Dockerfile - Docker repo is now architecture-aware
- Updated Dockerfiles for cross-building release artifacts - fpm packages by arch - fixes Dockerfile.build due to Docker-ce not available for s390x - Makefile actions now uses docker buildx - Removing pulling of ubuntu:focal in Makefile: docker pull would not cache other architecture's images - Windows and MacOS release artifacts are now built in release/Dockerfile.in
I am working on adding arm64 jobs in CircleCI in the consul repo, which uses Fortio images for envoy tests. These changes are working perfectly for building the arm64 image for Fortio and successfully tested it as well. It will be helpful if Fortio images are released. |
I haven't forgotten, it's just been very busy |
I got your branch locally and was trying to make v39 of the build image:
so I tried
reading around seems --load doesn't quite work in multi arch so I tried
|
I reproed indeed the arm failure and found what I think is a more direct issue golangci/golangci-lint#2673 (not related to 1.18) - I updated in 18a6c2c |
…--load doesn't work for me... had to split build and push and call just push
looks like it succeeded: I tagged v1.27.0-pre1 on a copy of your fork in this repo and: https://github.com/fortio/fortio/runs/6056074667?check_suite_focus=true -> So beside my question above, if you compare with it's missing the rpm, the deb and orig.tar.gz |
fixed that part |
https://github.com/fortio/fortio/releases/tag/v1.27.0-pre2 has a lot of artifacts now :) |
An alternative that allows installing golang-ci-lint as before also on ARM64 is by bumping to golang:1.18. See the issue above.
cc @yselkowitz
Refers ARMOCP-293