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

Switch to tonistiigi/xx across controllers for cross-platform builds #1910

Closed
6 tasks done
hiddeco opened this issue Oct 8, 2021 · 5 comments
Closed
6 tasks done
Labels
area/ci CI related issues and pull requests enhancement New feature or request

Comments

@hiddeco
Copy link
Member

hiddeco commented Oct 8, 2021

https://github.com/tonistiigi/xx allows for cross-compilation from Dockerfiles to any platform using the architecture of the builder, which gives native performance. Using this, the source-controller - which had this changed in fluxcd/source-controller#449 - saw a release build time reduction from 40 minutes to 10 (4x less!).

Given the other controllers struggle with the same long duration, we should port their Dockerfiles to make us of this as well. While doing this, it should be taken into account that the GitHub Action workflows should likely be rewritten to make more efficiently use of the Dockerfile during (end-to-end) tests, and could be making use of (commit SHA based) caching and/or a local registry.

This should also still be addressed in the source-controller and image-automation-controller, as documented in fluxcd/source-controller@a871e0b and fluxcd/image-automation-controller@64ca8dc.

To-do

@relu
Copy link
Member

relu commented Oct 27, 2021

Since all of the PRs have been merged I'm going to close this. Great work, @darkowlzz! 🥇

@relu relu closed this as completed Oct 27, 2021
@darkowlzz
Copy link
Contributor

darkowlzz commented Oct 27, 2021

Thanks @relu .

I had a discussion about this issue with @hiddeco a few weeks ago and there were a few more things we wanted to do as part of this issue. As mentioned in the issue description, we wanted to rewrite github action workflows to be able to test the built image and conditionally release it for builds triggered on tags. The concern was that the current release pipelines don't test the built images and we could publish untested images.
After doing some research on how to do this, the apparent solution was to have one single workflow that builds, tests and releases (conditionally). For merge and PR builds, the release step won't be executed. Release step will be run only for tags.

We can reopen this or have another issue to track that, as this issue already covered a lot of build changes.

@hiddeco
Copy link
Member Author

hiddeco commented Oct 28, 2021

Lets re-open this one as it is clear what it's about.

@hiddeco hiddeco reopened this Oct 28, 2021
@relu
Copy link
Member

relu commented Oct 28, 2021

Ah, sorry guys, I missed the "in a future iteration" part and misunderstood the end goal of this issue.

@hiddeco
Copy link
Member Author

hiddeco commented Apr 20, 2022

This has been taken care of a long time ago already.

@hiddeco hiddeco closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI related issues and pull requests enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants