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

Target multiple architectures #28

Closed
wants to merge 4 commits into from
Closed

Target multiple architectures #28

wants to merge 4 commits into from

Conversation

Filius-Patris
Copy link
Contributor

@Filius-Patris Filius-Patris commented Jul 10, 2020

@Hyzual could you please run the pipeline? I'm not 100% sure if it works correctly. I ran it locally and I think it worked...

Tagging issue #21.

@Hyzual
Copy link
Collaborator

Hyzual commented Jul 13, 2020

Hi, I've updated the CI workflow so that it runs on pull requests also.
It looks like buildx isn't supported though :/

docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64 . --file Dockerfile --tag hyzual/koel-dev:latest
multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")

@Filius-Patris
Copy link
Contributor Author

Ah, I see. There needs to be a special "builder" (read: profile) selected. I probably did this already on my machine. If you can push to this branch, just prepend docker buildx create --use to the build, command, which will create and instantly use a new builder (comparable to git checkout -b).

I am currently on vacation without a PC, but in ~ 2 weeks I could do it.

By the way, I forgot to mention, this will probably increase minute usage of the builds.

@Filius-Patris
Copy link
Contributor Author

Filius-Patris commented Jul 27, 2020

Hmm... I tired some more and almost got it working, but this error is throwing me off:
https://github.com/Filius-Patris/docker-koel/runs/910113057?check_suite_focus=true#step:5:8811

I'll be working on isolating the problem. Not on this PR though, in order to (1) not use up your build minutes 😉 and (2) not mess up your git history.

One can follow my progress on the multi-arch-testing branch

@Hyzual
Copy link
Collaborator

Hyzual commented Jul 28, 2020

Ok thanks 😄 ! Thanks for your help !

@Filius-Patris
Copy link
Contributor Author

Blocked by #21

I will close this issue for the time being, until #21 is resolved. We're blocked by the cypress e2e testing framewrok. See this comment: #21 (comment)

@Filius-Patris Filius-Patris changed the title [WIP] Target multiple architectures Target multiple architectures Jul 31, 2020
Hyzual added a commit that referenced this pull request Aug 3, 2020
* Revert and fix commit 3198879

Commit 3198879 prepended the CYPRESS_INSTALL_BINARY=0 variable to
the install command in the ressources/assets directory, however
this component does not require cypress.

The root component however does. This environment variable should
be prepended to the second install command.

* Add 'install buildx' step

This is just blindly following this blogpost:
https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

* Target multiple architectures

See this blogpost for more on how this works:
https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

* Add python2 dependency to front-builder

This error message shows it:
https://github.com/Filius-Patris/docker-koel/runs/915997770?check_suite_focus=true#step:5:8914

This issue comment suggests why:
sass/node-sass#1176 (comment)
TL;DR: Building some component requires python. This would normally be
precompiled and fetched, but arm doesn't have precompiled packages.

* Increase network timeout

The CICD errors seems to be tied to this:
yarnpkg/yarn#4890 (comment)

* Try building the 3 architectures at the end of the CI.

This is meant to test the CI. If it works, it will be done in
publish.yml instead of dockerimage.yml.

* Update CI/CD pipelines

For more details, see the discussions on PR #31.

With this commit, some targets in the Makefile are unneeded, but
I left them anyway.

* Correcting the tags: argument

I wasn't understanding the docs correctly.

* Refine CI/CD pipelines more

With this commit the pipeline completely cut reliance to the Makefile.
This helps to make everything more obvious by only looking at the pipeline
yaml file.

Co-authored-by: Joris MASSON <hyzual@gmail.com>
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.

2 participants