-
Notifications
You must be signed in to change notification settings - Fork 56
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 (follow-up to #28) #31
Conversation
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.
This is just blindly following this blogpost: https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/
See this blogpost for more on how this works: https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/
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.
Dude, whatthe..... why are these failing again.... |
The CICD errors seems to be tied to this: yarnpkg/yarn#4890 (comment)
Hmm... the goss test fail, but not because of some test cases, but rather because this:
@Hyzual could you look into it? Is it a login related issue? |
Hi, it's likely an issue with the Docker tag. I imagine the images now have tags to distinguish their supported architecture (amd64, arm) so we need to add the right tag to the command. I'll take a look later today. |
Ok, I think I got the issue. Now the workarounds are:
See issue docker/buildx#59 (which is closed ironically) To me the most reasonable approach would be option 2. It should be fairly easy to implement and probably won't increase the build times by a lot. I have one more question though: If the
The CI tests then would omit step 5 and thus be as fast as before (~6min). |
Oops I just realized I made a mistake again... The stage is indeed named I agree with you, option 2 looks the better choice. I am fine with the proposed workflow: Docker Image CI should only test x86_64 (same as today), and Docker Hub publish workflow should also build and push the 3 architectures. |
This is meant to test the CI. If it works, it will be done in publish.yml instead of dockerimage.yml.
Wait, don't merge this. Publishing won't work. You'll need to use buildx with the I'll update the PR tomorrow. Are you leaning more towards using actions or using Makefile definitions? |
Ok thanks :). I was not going to merge this as it is anyway, we should edit |
Side comment: I was wondering why the build time sky-rocketed from about 7 min to more than an hour. I just realized that the single step of building and minifiying koel's frontend assets takes 20 minutes on an arm / arm64 architecture. That's just crazy 😧 |
For more details, see the discussions on PR #31. With this commit, some targets in the Makefile are unneeded, but I left them anyway.
I wasn't understanding the docs correctly.
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.
Nope, just pull I've made these changes to the pipeline:
I hope you're fine with them. If not, just mention it. A further question: The structure mentioned here might be useful for this repo: Should I implement this too in the same PR? |
I'd suggest one workflow file like this: name: Continuous integration and deployment
on:
push:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install goss and dgoss
uses: e1himself/goss-installation-action@v1
with:
# Goss release version to install
version: "v0.3.13"
- name: Checkout code
uses: actions/checkout@v2
- name: Build the testing Docker image
uses: docker/build-push-action@v1.1.0
with:
push: false
repository: hyzual/koel
tags: test
- name: Run goss tests on the testing image
run: dgoss run hyzual/koel:test
deploy:
runs-on: ubuntu-latest
needs: [test]
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push production image
uses: zmingxie/docker_buildx@v1.1
with:
publish: true
imageName: hyzual/koel
tag: latest
dockerHubUser: ${{ secrets.DOCKER_HUB_USERNAME }}
dockerHubPassword: ${{ secrets.DOCKER_HUB_PASSWORD }} |
Ok great ! Thanks for the changes, I am fine with them ! Thanks for all the work, I'll be merging this PR |
This is a follow-up to #28, I force-pushed to it... 🙄
Description:
This PR makes the CI (GitHub Actions) build docker images working on not just x86_64, but also armv7 and arm64 (for example Raspberry Pis).
Prerequisites:
This PR is based on #30. While you technically could just merge this one, I think it separates the commits into more logically complete units.
Caveats:
It increases the buildtimes by a huge amount.
Build minutes on GitHub Actions are free for public repos though, so I think this would be fine.
See also:
Fixes issue #21.
Follow-up to PR #28.
PR #30 resolves problems with cypress.